From 8a6ccb54aa7c78dc3525423b54c0737088b6a60e Mon Sep 17 00:00:00 2001 From: Anatolii Zhmaiev Date: Tue, 26 Nov 2024 14:08:04 +0200 Subject: [PATCH] Optimize backport.yml Use ENV var instead of empty job with output. See https://github.com/hazelcast/hz-docs/pull/1403 --- .github/workflows/backport.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 8eaf3379..287f9345 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -3,20 +3,17 @@ 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"]' @@ -24,11 +21,10 @@ jobs: 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 }}"]'