diff --git a/.github/workflows/acc-tests.yml b/.github/workflows/acc-tests.yml index 665fee22..97b420a8 100644 --- a/.github/workflows/acc-tests.yml +++ b/.github/workflows/acc-tests.yml @@ -18,6 +18,11 @@ on: description: Project name to create the tested objects in required: false type: string + ref: + description: Reference branch, tag or commit SHA to checkout + required: false + type: string + default: main secrets: clientSecret: description: Client secret to use for authentication @@ -31,7 +36,7 @@ jobs: uses: actions/checkout@v4 with: repository: nobl9/terraform-provider-nobl9 - ref: main + ref: ${{ inputs.ref }} - uses: actions/setup-go@v5 with: go-version-file: go.mod diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 08b11295..db88d2ed 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -2,12 +2,13 @@ name: Release candidate on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-" jobs: test: uses: ./.github/workflows/acc-tests.yml with: clientId: "${{ vars.TERRAFORM_NOBL9_CLIENT_ID }}" project: "${{ vars.TERRAFORM_NOBL9_PROJECT }}" + ref: "${{ github.ref_name }}" secrets: clientSecret: "${{ secrets.TERRAFORM_NOBL9_CLIENT_SECRET }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dc04688..acc350b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: with: clientId: "${{ vars.TERRAFORM_NOBL9_CLIENT_ID }}" project: "${{ vars.TERRAFORM_NOBL9_PROJECT }}" + ref: "${{ github.ref_name }}" secrets: clientSecret: "${{ secrets.TERRAFORM_NOBL9_CLIENT_SECRET }}" goreleaser: @@ -53,3 +54,4 @@ jobs: env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GORELEASER_CURRENT_TAG: ${{ github.ref_name }}