Skip to content

Commit

Permalink
github-action: use ephemeral tokens with the required permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Sep 9, 2024
1 parent 4c786ea commit 7ec9cc2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/update-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,23 @@ jobs:

- uses: actions/checkout@v4

- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: "--experimental apply --config .github/update-specs.yml"
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

- if: failure()
uses: elastic/oblt-actions/slack/send@v1
Expand Down

0 comments on commit 7ec9cc2

Please sign in to comment.