Skip to content

Commit

Permalink
github-action: use ephemeral tokens with the required permissions (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Sep 18, 2024
1 parent f480ec1 commit 16ab55a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/updatecli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ jobs:
steps:
- 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 .ci/updatecli.d"
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 16ab55a

Please sign in to comment.