From dbe3b346095d9812c1aae99a5ea8ff8af8e65476 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Tue, 11 Nov 2025 09:55:25 +0100 Subject: [PATCH] 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 <91018726+mr-cheffy@users.noreply.github.com> --------- Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> --- .github/workflows/check-candidate-release.yml | 10 ++++++++++ .github/workflows/sync-upstream.yml | 16 +++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-candidate-release.yml b/.github/workflows/check-candidate-release.yml index b8b9a7dd8..25ee939c9 100644 --- a/.github/workflows/check-candidate-release.yml +++ b/.github/workflows/check-candidate-release.yml @@ -22,3 +22,13 @@ jobs: DISCORD_PING_IDS: ${{ secrets.DISCORD_PING_IDS }} run: | python3 scripts/check_rc_response.py + + sync-upstream: + name: Sync Upstream + uses: ./.github/workflows/sync-upstream.yml + permissions: + contents: write + secrets: inherit + needs: [check_candidates] + with: + release_candidate: 'true' diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index b548eb105..6a08b46e2 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -1,8 +1,6 @@ name: Sync Upstream Firefox Releases on: - schedule: - - cron: '59 4 * * 2' workflow_dispatch: inputs: release_candidate: @@ -21,15 +19,27 @@ jobs: - name: Check out repository uses: actions/checkout@v3 + - name: Check if upstream branch already exists + id: check-upstream-branch + run: | + if git ls-remote --heads origin chore/upstream-sync | grep -sw "refs/heads/chore/upstream-sync" > /dev/null; then + echo "branch_exists=true" >> $GITHUB_OUTPUT + else + echo "branch_exists=false" >> $GITHUB_OUTPUT + fi + - name: Setup Node.js uses: actions/setup-node@v4 + if: steps.check-upstream-branch.outputs.branch_exists == 'false' with: node-version-file: '.nvmrc' - name: Install dependencies + if: steps.check-upstream-branch.outputs.branch_exists == 'false' run: npm ci - name: Sync Upstream Releases + if: steps.check-upstream-branch.outputs.branch_exists == 'false' run: | if [ "${{ github.event.inputs.release_candidate }}" = "true" ]; then npm run sync:rc @@ -74,7 +84,7 @@ jobs: with: token: ${{ secrets.DEPLOY_KEY }} commit-message: 'chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`' - branch: 'chore/sync-upstream-${{ steps.build-data.outputs.version }}' + branch: 'chore/upstream-sync' title: 'Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}' body: | This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.