Skip to content

Commit 21b0777

Browse files
authored
chore: update lightspeed sync action to only sync release branches (#264)
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
1 parent c9ae028 commit 21b0777

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/sync-lightspeed-configs.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ on:
55
- cron: '0 4 * * *'
66
workflow_dispatch:
77

8-
concurrency:
9-
group: ${{ github.workflow }}
10-
cancel-in-progress: true
11-
128
jobs:
139
sync-lightspeed:
14-
name: Sync Lightspeed Configs
10+
name: Sync Lightspeed Configs (${{ matrix.branch }})
1511
runs-on: ubuntu-latest
1612

13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
branch:
17+
- release-1.10
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ matrix.branch }}
21+
cancel-in-progress: true
22+
1723
permissions:
1824
contents: write
1925
pull-requests: write
@@ -22,6 +28,7 @@ jobs:
2228
- name: Checkout
2329
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2430
with:
31+
ref: ${{ matrix.branch }}
2532
fetch-depth: 0
2633

2734
- name: Configure Git
@@ -30,7 +37,7 @@ jobs:
3037
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3138
3239
- name: Sync Lightspeed config files
33-
run: ./scripts/sync-lightspeed-configs.sh
40+
run: ./scripts/sync-lightspeed-configs.sh --ref ${{ matrix.branch }}
3441

3542
- name: Check for changes
3643
id: changes
@@ -47,11 +54,12 @@ jobs:
4754
if: steps.changes.outputs.has_changes == 'true'
4855
env:
4956
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
TARGET_BRANCH: ${{ matrix.branch }}
5058
run: |
5159
TITLE="chore(lightspeed): sync config files from upstream"
52-
BRANCH="chore/sync-lightspeed-configs"
60+
BRANCH="chore/sync-lightspeed-configs-${TARGET_BRANCH}"
5361
54-
EXISTING_PR=$(gh pr list --head "${BRANCH}" --state open --json number --jq '.[0].number // empty')
62+
EXISTING_PR=$(gh pr list --head "${BRANCH}" --base "${TARGET_BRANCH}" --state open --json number --jq '.[0].number // empty')
5563
5664
git checkout -b "${BRANCH}"
5765
@@ -84,5 +92,5 @@ jobs:
8492
gh pr create \
8593
--title "${TITLE}" \
8694
--body "${BODY}" \
87-
--base "${{ github.ref_name }}"
95+
--base "${TARGET_BRANCH}"
8896
fi

0 commit comments

Comments
 (0)