From 1b548561e63dbc8dbe68aeedeed469bf84d3f5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20K=C3=B6ster?= Date: Wed, 30 Aug 2023 11:50:46 +0200 Subject: [PATCH] use a PAT to allow automatic action trigger on PR --- .github/workflows/PR-into-2021-1.yml | 9 +++++---- .github/workflows/PR-into-2021-2.yml | 11 ++++++----- .github/workflows/PR-into-2021-3.yml | 9 +++++---- .github/workflows/PR-into-2022-2.yml | 9 +++++---- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/PR-into-2021-1.yml b/.github/workflows/PR-into-2021-1.yml index d3c21b2..c671638 100644 --- a/.github/workflows/PR-into-2021-1.yml +++ b/.github/workflows/PR-into-2021-1.yml @@ -11,7 +11,7 @@ jobs: merge-and-PR-into-2021-1: # only trigger if it was actually merged if: github.event.pull_request.merged == true - + runs-on: ubuntu-latest steps: @@ -21,14 +21,14 @@ jobs: with: ref: 'mps/2021.1' fetch-depth: 0 - + # actually merge from the previous branch - name: Perform merge from 2020.3 to 2021.1 run: | # setup to allow to merge and commit git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - + # actual merge operation git merge --no-ff --message "Merge 2020.3 -> 2021.1" origin/mps/2020.3 -- || ( echo "Merge failed. Please merge manually!" ; exit 1 ) @@ -36,10 +36,11 @@ jobs: - name: Create PR for MPS 2021.1 uses: peter-evans/create-pull-request@v5 with: + token: ${{ secrets.MPS_REPO_PAT }} branch: 'merge/2021.1' commit-message: Merge mps/2020.3 into mps/2021.1 title: ${{ github.event.pull_request.title }} (2020.3 -> 2021.1) body: | This is an automatic PR which merges changes from `mps/2020.3` to `mps/2021.1`. - + [Link to previous PR for `mps/2020.3`](${{ github.event.pull_request._links.html.href }}) diff --git a/.github/workflows/PR-into-2021-2.yml b/.github/workflows/PR-into-2021-2.yml index 707a459..9904061 100644 --- a/.github/workflows/PR-into-2021-2.yml +++ b/.github/workflows/PR-into-2021-2.yml @@ -11,7 +11,7 @@ jobs: merge-and-PR-into-2021-2: # only trigger if it was actually merged if: github.event.pull_request.merged == true - + runs-on: ubuntu-latest steps: @@ -21,14 +21,14 @@ jobs: with: ref: 'mps/2021.2' fetch-depth: 0 - + # actually merge from the previous branch - name: Perform merge from 2021.1 to 2021.2 run: | # setup to allow to merge and commit git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - + # actual merge operation git merge --no-ff --message "Merge 2021.1 -> 2021.2" origin/mps/2021.1 -- || ( echo "Merge failed. Please merge manually!" ; exit 1 ) @@ -39,15 +39,16 @@ jobs: NEW_TITLE='${{ github.event.pull_request.title }}' NEW_TITLE="${NEW_TITLE// (2020.3 -> 2021.1)}" echo "NEW_TITLE=$NEW_TITLE" >> $GITHUB_ENV - + # create a PR based on the merge - name: Create PR for MPS 2021.2 uses: peter-evans/create-pull-request@v5 with: + token: ${{ secrets.MPS_REPO_PAT }} branch: 'merge/2021.2' commit-message: Merge mps/2021.1 into mps/2021.2 title: ${{ env.NEW_TITLE }} (2021.1 -> 2021.2) body: | This is an automatic PR which merges changes from `mps/2021.1` to `mps/2021.2`. - + [Link to previous PR for `mps/2021.1`](${{ github.event.pull_request._links.html.href }}) diff --git a/.github/workflows/PR-into-2021-3.yml b/.github/workflows/PR-into-2021-3.yml index da47d8d..de6dd9c 100644 --- a/.github/workflows/PR-into-2021-3.yml +++ b/.github/workflows/PR-into-2021-3.yml @@ -11,7 +11,7 @@ jobs: merge-and-PR-into-2021-3: # only trigger if it was actually merged if: github.event.pull_request.merged == true - + runs-on: ubuntu-latest steps: @@ -21,14 +21,14 @@ jobs: with: ref: 'mps/2021.3' fetch-depth: 0 - + # actually merge from the previous branch - name: Perform merge from 2021.2 to 2021.3 run: | # setup to allow to merge and commit git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - + # actual merge operation git merge --no-ff --message "Merge 2021.2 -> 2021.3" origin/mps/2021.2 -- || ( echo "Merge failed. Please merge manually!" ; exit 1 ) @@ -44,10 +44,11 @@ jobs: - name: Create PR for MPS 2021.3 uses: peter-evans/create-pull-request@v5 with: + token: ${{ secrets.MPS_REPO_PAT }} branch: 'merge/2021.3' commit-message: Merge mps/2021.2 into mps/2021.3 title: ${{ env.NEW_TITLE }} (2021.2 -> 2021.3) body: | This is an automatic PR which merges changes from `mps/2021.2` to `mps/2021.3` - + [Link to previous PR for `mps/2020.3`](${{ github.event.pull_request._links.html.href }}) diff --git a/.github/workflows/PR-into-2022-2.yml b/.github/workflows/PR-into-2022-2.yml index fe037f0..a022351 100644 --- a/.github/workflows/PR-into-2022-2.yml +++ b/.github/workflows/PR-into-2022-2.yml @@ -11,7 +11,7 @@ jobs: merge-and-PR-into-2022-2: # only trigger if it was actually merged if: github.event.pull_request.merged == true - + runs-on: ubuntu-latest steps: @@ -21,14 +21,14 @@ jobs: with: ref: 'mps/2022.2' fetch-depth: 0 - + # actually merge from the previous branch - name: Perform merge from 2021.3 to 2022.2 run: | # setup to allow to merge and commit git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - + # actual merge operation git merge --no-ff --message "Merge 2021.3 -> 2022.2" origin/mps/2021.3 -- || ( echo "Merge failed. Please merge manually!" ; exit 1 ) @@ -44,10 +44,11 @@ jobs: - name: Create PR for MPS 2022.2 uses: peter-evans/create-pull-request@v5 with: + token: ${{ secrets.MPS_REPO_PAT }} branch: 'merge/2022.2' commit-message: Merge mps/2022.3 into mps/2022.2 title: ${{ env.NEW_TITLE }} (2021.3 -> 2022.2) body: | This is an automatic PR which merges changes from `mps/2021.3` to `mps/2022.2` - + [Link to previous PR for `mps/2021.3`](${{ github.event.pull_request._links.html.href }})