Skip to content

Commit

Permalink
Optimize backport.yml
Browse files Browse the repository at this point in the history
Use ENV var instead of empty job with output.
See hazelcast/hz-docs#1403
  • Loading branch information
zhmaeff committed Nov 26, 2024
1 parent 3030916 commit 8a6ccb5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,28 @@ on:
push:
branches:
- main

env:
MAINTENANCE_BRANCHES: "['5.8', '5.9', '5.10', '5.11', '5.12', '5.13', '5.14']"

jobs:
get-maintenance-branches:
runs-on: ubuntu-latest
outputs:
branches: "['5.8', '5.9', '5.10', '5.11', '5.12', '5.13', '5.14']"
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) }}
branch: ${{ fromJSON(env.MAINTENANCE_BRANCHES) }}
uses: hazelcast/hz-docs/.github/workflows/backport-workflow.yml@main
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) }}
branch: ${{ fromJSON(env.MAINTENANCE_BRANCHES) }}
uses: hazelcast/hz-docs/.github/workflows/backport-workflow.yml@main
with:
label-to-check-for: '["backport to ${{ matrix.branch }}"]'
Expand Down

0 comments on commit 8a6ccb5

Please sign in to comment.