From 5ae4f4f032822ae4948304ad7a2632adec2b4ac7 Mon Sep 17 00:00:00 2001 From: Carine Bonnafous Date: Thu, 18 Jul 2024 15:14:56 +0200 Subject: [PATCH] ci: fix release PR not triggering workflows when opened --- .github/workflows/release-pull-request.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release-pull-request.yml b/.github/workflows/release-pull-request.yml index 9745c56..c946f93 100644 --- a/.github/workflows/release-pull-request.yml +++ b/.github/workflows/release-pull-request.yml @@ -44,9 +44,20 @@ jobs: run: | ./scripts/update-files-with-release-version.sh ${{ steps.release-drafter.outputs.tag_name }} + # If using default Github token, the created pull request won't trigger workflows with pull_request event + # See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs + - name: Generate Github token to create PR + uses: actions/create-github-app-token@v1 + id: github-token + with: + app-id: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_ID }} + private-key: ${{ secrets.ALMA_CREATE_TEAM_PRS_APP_PEM }} + repositories: sfcc-cartridge + - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: + token: ${{ steps.github-token.outputs.token }} commit-message: 'chore: update version' title: Release ${{ steps.release-drafter.outputs.tag_name }} body: |