Skip to content

Commit b7c42d7

Browse files
authored
ci: use GitHub app for ephemeral tokens (#160)
1 parent 4a195e1 commit b7c42d7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/e2e.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,24 @@ jobs:
4040
id: bootstrap
4141
uses: ./.github/workflows/bootstrap
4242

43-
- uses: elastic/oblt-actions/google/auth@v1.13.0
43+
- uses: elastic/oblt-actions/google/auth@v1
4444

45-
- uses: elastic/oblt-actions/oblt-cli/[email protected]
45+
- name: Get token
46+
id: get_token
47+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
4648
with:
47-
github-token: ${{ secrets.OBLT_CLI_GITHUB_TOKEN }}
49+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
50+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
51+
permissions: >-
52+
{
53+
"contents": "read"
54+
}
55+
repositories: >-
56+
["observability-test-environments"]
57+
58+
- uses: elastic/oblt-actions/oblt-cli/cluster-credentials@v1
59+
with:
60+
github-token: ${{ steps.get_token.outputs.token }}
4861
cluster-name: ${{ env.SERVERLESS_PROJECT }}
4962

5063
- uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4

0 commit comments

Comments
 (0)