Skip to content

Commit 4f0e842

Browse files
authored
Merge pull request #24 from diagridio/terraform-release
ci: fix terraform release job
2 parents d381c2c + 22fe5d8 commit 4f0e842

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions:
1515

1616
jobs:
1717
goreleaser:
18+
name: 'Go Release'
1819
runs-on: ubuntu-latest
1920
steps:
2021
- name: Checkout
@@ -63,10 +64,25 @@ jobs:
6364

6465
terraform-provider-release:
6566
name: 'Terraform Provider Release'
66-
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@v4
67-
with:
68-
setup-go-version-file: go.mod
69-
secrets:
70-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
71-
gpg-private-key-passphrase: ${{ secrets.GPG_PASSPHRASE }}
67+
steps:
68+
- name: Get Token
69+
id: get_workflow_token
70+
uses: peter-murray/workflow-application-token-action@v4
71+
with:
72+
application_id: ${{ secrets.DIAGRID_BOT_APPLICATION_ID }}
73+
application_private_key: ${{ secrets.DIAGRID_BOT_APPLICATION_PRIVATE_KEY }}
74+
revoke_token: true
75+
76+
- name: Grant access to private diagrid repos
77+
shell: bash # required on run steps in composite actions
78+
run: |
79+
git config --global url."https://x-access-token:${{ inputs.workflow_token || steps.get_workflow_token.outputs.token }}@github.com/diagridio/".insteadOf "https://github.com/diagridio/"
80+
81+
- name: Terraform Provider Release
82+
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@v4
83+
with:
84+
setup-go-version-file: go.mod
85+
secrets:
86+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
87+
gpg-private-key-passphrase: ${{ secrets.GPG_PASSPHRASE }}
7288

0 commit comments

Comments
 (0)