diff --git a/.github/workflows/bump-elastic-stack.yml b/.github/workflows/bump-elastic-stack.yml index 36a16bbb4a1..a6df8e227db 100644 --- a/.github/workflows/bump-elastic-stack.yml +++ b/.github/workflows/bump-elastic-stack.yml @@ -30,12 +30,24 @@ jobs: with: ref: ${{ matrix.branch }} + - 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/bump-elastic-stack-snapshot.yml --values .ci/updatecli/values.d/scm.yml env: BRANCH: ${{ matrix.branch }} - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - if: ${{ failure() }} uses: elastic/oblt-actions/slack/send@v1 diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index 77f29f46112..3db00af7887 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -41,11 +41,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 .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml env: - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} GITHUB_BRANCH: 'main' GITHUB_LABELS: ${{ needs.labels.outputs.backports }} @@ -60,7 +72,7 @@ jobs: with: command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml env: - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} GITHUB_BRANCH: '7.17' GITHUB_LABELS: 'backport-skip' diff --git a/.github/workflows/update-beats.yml b/.github/workflows/update-beats.yml index 9570c89a82b..cdacf8f7a3a 100644 --- a/.github/workflows/update-beats.yml +++ b/.github/workflows/update-beats.yml @@ -29,6 +29,18 @@ jobs: with: ref: ${{ matrix.branch }} + - 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: actions/setup-go@v5 with: go-version-file: go.mod @@ -38,7 +50,7 @@ jobs: command: --experimental apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml env: BRANCH_NAME: ${{ matrix.branch }} - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - if: ${{ failure() }} uses: elastic/oblt-actions/slack/send@v1 diff --git a/.github/workflows/update-compose.yml b/.github/workflows/update-compose.yml index 370ad05ec26..051a9008adc 100644 --- a/.github/workflows/update-compose.yml +++ b/.github/workflows/update-compose.yml @@ -18,6 +18,18 @@ 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: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: registry: ghcr.io @@ -28,13 +40,13 @@ jobs: with: command: --experimental compose diff env: - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose apply env: - GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - if: ${{ failure() }} uses: elastic/oblt-actions/slack/send@v1