From 71c35e8466cde02ae95d8c5f0d764139fc0712e3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 29 Nov 2023 20:41:17 +0100 Subject: [PATCH] .github: Update workflows to use actions variables (#207) Reference: https://github.com/hashicorp/terraform-devex-repos/issues/17 Reference: https://github.com/hashicorp/terraform-devex-repos/issues/35 --- .github/workflows/release.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6935535..0fe1a9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,6 @@ on: permissions: contents: read # Changelog commit operations use service account PAT -env: - CI_COMMIT_AUTHOR: hc-github-team-tf-provider-devex - CI_COMMIT_EMAIL: github-team-tf-provider-devex@hashicorp.com - jobs: changelog-version: runs-on: ubuntu-latest @@ -47,11 +43,11 @@ jobs: args: merge - name: Git push changelog run: | - git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" - git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" + git config --global user.name "${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}" + git config --global user.email "${{ vars.TF_DEVEX_CI_COMMIT_EMAIL }}" git add . git commit -a -m "Update changelog" - git push "https://${{ env.CI_COMMIT_AUTHOR }}:${{ secrets.TF_DEVEX_COMMIT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" + git push "https://${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}:${{ secrets.TF_DEVEX_COMMIT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" release-tag: needs: changelog @@ -70,11 +66,11 @@ jobs: - name: Git push release tag run: | - git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" - git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" + git config --global user.name "${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}" + git config --global user.email "${{ vars.TF_DEVEX_CI_COMMIT_EMAIL }}" git tag "${{ inputs.versionNumber }}" - git push "https://${{ env.CI_COMMIT_AUTHOR }}:${{ secrets.TF_DEVEX_COMMIT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" "${{ inputs.versionNumber }}" + git push "https://${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}:${{ secrets.TF_DEVEX_COMMIT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" "${{ inputs.versionNumber }}" goreleaser: needs: [ changelog-version, changelog, release-tag ]