Skip to content

Commit

Permalink
Parameterize the golangci/golangci-lint-action dependency version wit…
Browse files Browse the repository at this point in the history
…h the

Github action workflow call parameter "golangci-version" in provider-ci.yml

- From time to time, we need to bump the golangci-lint version used with a
  specific official provider. In that case, we would like to be able to do
  so without a change in the uptest repo where the common CI definitions are,
  and to do so without bumping this dependency across all the provider repos.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed Jan 28, 2024
1 parent 6a53f0c commit 112fe89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/provider-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: '1.20'
required: false
type: string
golangci-version:
description: 'The version string to be used with the golangci-lint action'
default: 'v1.55.2'
required: false
type: string
secrets:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR:
required: true
Expand All @@ -20,7 +25,6 @@ on:

env:
# Common versions
GOLANGCI_VERSION: 'v1.54.2'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
Expand Down Expand Up @@ -112,7 +116,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
version: ${{ env.GOLANGCI_VERSION }}
version: ${{ inputs.golangci-version }}
args: --timeout=30m

check-diff:
Expand Down

0 comments on commit 112fe89

Please sign in to comment.