Make backporting action use PRs to support protected branches [DOC-26… #773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backport changes to maintenance branches | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
get-maintenance-branches: | |
runs-on: ubuntu-latest | |
outputs: | |
branches: "['5.3', '5.4', '5.5']" | |
steps: | |
- run: exit 0 | |
backport-to-all-branch: | |
needs: get-maintenance-branches | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: ${{ fromJSON(needs.get-maintenance-branches.outputs.branches) }} | |
uses: ./.github/workflows/backport-workflow.yml | |
with: | |
label-to-check-for: '["backport to all versions"]' | |
target-branch: v/${{ matrix.branch }} | |
secrets: inherit | |
backport-to-specified-branch: | |
needs: get-maintenance-branches | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: ${{ fromJSON(needs.get-maintenance-branches.outputs.branches) }} | |
uses: ./.github/workflows/backport-workflow.yml | |
with: | |
label-to-check-for: '["backport to ${{ matrix.branch }}"]' | |
target-branch: v/${{ matrix.branch }} | |
secrets: inherit |