Skip to content

Commit dbe3b34

Browse files
authored
chore: Check for upstream updates after running rc checks, p=#11254
* chore: New upstream fetch script, b=no-bug, c=workflows, scripts * chore: Check for upstream updates after running rc checks, b=no-bug, c=workflows * chore: Lint, b=no-bug, c=workflows * Fix typo in workflow name for patch check Signed-off-by: mr. m <[email protected]> --------- Signed-off-by: mr. m <[email protected]>
1 parent 47395bf commit dbe3b34

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/check-candidate-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ jobs:
2222
DISCORD_PING_IDS: ${{ secrets.DISCORD_PING_IDS }}
2323
run: |
2424
python3 scripts/check_rc_response.py
25+
26+
sync-upstream:
27+
name: Sync Upstream
28+
uses: ./.github/workflows/sync-upstream.yml
29+
permissions:
30+
contents: write
31+
secrets: inherit
32+
needs: [check_candidates]
33+
with:
34+
release_candidate: 'true'

.github/workflows/sync-upstream.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Sync Upstream Firefox Releases
22

33
on:
4-
schedule:
5-
- cron: '59 4 * * 2'
64
workflow_dispatch:
75
inputs:
86
release_candidate:
@@ -21,15 +19,27 @@ jobs:
2119
- name: Check out repository
2220
uses: actions/checkout@v3
2321

22+
- name: Check if upstream branch already exists
23+
id: check-upstream-branch
24+
run: |
25+
if git ls-remote --heads origin chore/upstream-sync | grep -sw "refs/heads/chore/upstream-sync" > /dev/null; then
26+
echo "branch_exists=true" >> $GITHUB_OUTPUT
27+
else
28+
echo "branch_exists=false" >> $GITHUB_OUTPUT
29+
fi
30+
2431
- name: Setup Node.js
2532
uses: actions/setup-node@v4
33+
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
2634
with:
2735
node-version-file: '.nvmrc'
2836

2937
- name: Install dependencies
38+
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
3039
run: npm ci
3140

3241
- name: Sync Upstream Releases
42+
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
3343
run: |
3444
if [ "${{ github.event.inputs.release_candidate }}" = "true" ]; then
3545
npm run sync:rc
@@ -74,7 +84,7 @@ jobs:
7484
with:
7585
token: ${{ secrets.DEPLOY_KEY }}
7686
commit-message: 'chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`'
77-
branch: 'chore/sync-upstream-${{ steps.build-data.outputs.version }}'
87+
branch: 'chore/upstream-sync'
7888
title: 'Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}'
7989
body: |
8090
This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.

0 commit comments

Comments
 (0)