Skip to content

Commit 8d4a0ac

Browse files
theletterfclaude
andauthored
Use ephemeral token for check-aw-updates workflow (#60)
Replace actions/create-github-app-token with Elastic's ephemeral GitHub tokens solution (Vault OIDC). Uses token-policy-8749eaab83f2 which grants contents:write, workflows:write, and pull_requests:write on docs-actions, docs-content, and docs-content-internal. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b56aa2 commit 8d4a0ac

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/check-aw-updates.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@ on:
55
- cron: '0 9 * * 1' # Weekly on Mondays at 9am UTC
66
workflow_dispatch:
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
128
jobs:
139
check-updates:
1410
name: Recompile lock files and open PR if changed
1511
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: read
1615
steps:
16+
- name: Create ephemeral GitHub token
17+
id: create-token
18+
uses: elastic/oblt-actions/github/create-token@v1
19+
with:
20+
token-policy: token-policy-8749eaab83f2
21+
1722
- uses: actions/checkout@v6
23+
with:
24+
token: ${{ steps.create-token.outputs.token }}
1825

1926
- name: Save current lock file checksums
2027
run: |
@@ -41,7 +48,7 @@ jobs:
4148
if: steps.changes.outputs.changed == 'true'
4249
uses: peter-evans/create-pull-request@v7
4350
with:
44-
token: ${{ secrets.GITHUB_TOKEN }}
51+
token: ${{ steps.create-token.outputs.token }}
4552
commit-message: |
4653
Update gh-aw lock files
4754

0 commit comments

Comments
 (0)