From 112fe89ff830f5790a1a2272a5f74264c801929a Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Sun, 28 Jan 2024 16:39:15 +0300 Subject: [PATCH] Parameterize the golangci/golangci-lint-action dependency version with 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 --- .github/workflows/provider-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/provider-ci.yml b/.github/workflows/provider-ci.yml index e2ed522..0162cd0 100644 --- a/.github/workflows/provider-ci.yml +++ b/.github/workflows/provider-ci.yml @@ -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 @@ -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 @@ -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: