Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/pick-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ on:

jobs:
create-pr-for-staging:
# contains(join()) to first join all labels into one string and then check
# if contains 'staging'
if: |
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'staging')
contains(join(github.event.pull_request.labels.*.name, ''), 'staging')
name: Create PR against staging branch
runs-on: ubuntu-latest
strategy:
Expand All @@ -21,7 +23,7 @@ jobs:

steps:
- name: Checkout main
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 2
Expand Down Expand Up @@ -73,10 +75,10 @@ jobs:

- name: Create or update PR
if: env.skip_pick != 'true' # Conditional execution
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.generate-token.outputs.token }}
branch: apply/commit-${{ github.sha }}
branch: apply/${{ matrix.label }}/commit-${{ github.sha }}
delete-branch: true
title: "[Cherry-Pick] ${{ github.event.pull_request.title }}"
body: "Triggered by commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\n\n${{ steps.cherry-pick.outputs.error && 'There were conflicts during the cherry-pick. These were commited without any resolving. Please resolve them manually and push the result to this branch before merging.' || 'The cherry-pick was successful without any conflicts. You should be able to simply merge this PR.' }}"
Expand Down