Skip to content

Commit 98a8a4e

Browse files
authored
Use Github test app for terratests github auth (#220)
1 parent 91bbd84 commit 98a8a4e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/shared-terraform-chatops.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ jobs:
210210
make -C test/src clean init
211211
rm -rf examples/*/.terraform examples/*/.terraform.lock.hcl
212212
213+
- uses: actions/create-github-app-token@v2
214+
if: ${{ needs.context.outputs.uses_github == 'true' }}
215+
id: github-app
216+
with:
217+
app-id: ${{ vars.BOT_GITHUB_APP_ID }}
218+
private-key: ${{ secrets.BOT_GITHUB_APP_PRIVATE_KEY }}
219+
owner: 'cloudposse-tests'
220+
213221
- name: Config
214222
shell: bash
215223
id: config
@@ -260,7 +268,7 @@ jobs:
260268
TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
261269
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
262270
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
263-
GITHUB_TOKEN: ${{ github.token }}
271+
GITHUB_TOKEN: ${{ steps.github-app.outputs.token }}
264272
shell: bash
265273
run: |
266274
if [[ "$USES_DATADOG" == "true" ]]; then

0 commit comments

Comments
 (0)