Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

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 0291b9c commit 2080a20
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/bump-aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ 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-and-notify@v1
with:
command: --experimental apply --config updatecli/updatecli.d/bump-aliases.yml --values updatecli/values.yml
Expand All @@ -24,4 +36,4 @@ jobs:
slack-message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"
slack-send-when: 'failure'
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

0 comments on commit 2080a20

Please sign in to comment.