feat: Add workflow to import expternal patches, b=no-bug, c=workflows, windows

This commit is contained in:
mr. m
2026-02-25 16:11:41 +01:00
parent a7c87e6392
commit 4ae9f81a68
8 changed files with 84 additions and 14 deletions

View File

@@ -248,8 +248,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: |

View File

@@ -70,8 +70,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install system dependencies
run: |

View File

@@ -68,8 +68,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install system dependencies
run: |

View File

@@ -38,8 +38,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install system dependencies
run: |

View File

@@ -0,0 +1,70 @@
name: Sync External Patches
on:
workflow_dispatch:
permissions:
contents: write
jobs:
check_candidates:
name: Sync External Patches
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
# note: This will use the version defined in '.python-version' by defaultç
- name: Install dependencies
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Import external patches
run: python3 scripts/import_external_patches.py
- name: Check if any files changed
id: git-check
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "files_changed=true" >> $GITHUB_OUTPUT
else
echo "files_changed=false" >> $GITHUB_OUTPUT
fi
- name: Download Firefox and dependencies
if: steps.git-check.outputs.files_changed == 'true'
run: npm run download
- name: Check if patches got applied
if: steps.git-check.outputs.files_changed == 'true'
id: check-patches
continue-on-error: true
run: |
echo "Checking if patches apply cleanly..."
npm run import
- name: Create pull request
uses: peter-evans/create-pull-request@v7
if: steps.git-check.outputs.files_changed == 'true'
env:
GIT_TRACE: 1
GIT_CURL_VERBOSE: 1
with:
token: ${{ secrets.DEPLOY_KEY }}
commit-message: "chore: Sync external patches"
branch: "chore/sync-external-patches-${{ github.run_id }}"
title: "Sync external patches"
body: |
This PR syncs the external patches automatically.
* ${{ steps.check-patches.outcome == 'failure' && '⚠️ Some patches did not apply cleanly. Please review them carefully.' || '✅ All patches applied cleanly.' }}
@${{ github.actor }} please review and merge this PR. Generated from workflow run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}), branch ${{ github.head_ref }}.
base: dev
git-token: ${{ secrets.DEPLOY_KEY }}
delete-branch: true

View File

@@ -50,8 +50,8 @@ jobs:
- name: Install dependencies
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
run: |
git config --global user.email "mr-cheffy@users.noreply.github.com"
git config --global user.name "mr-cheffy"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup surfer CI
if: steps.check-upstream-branch.outputs.branch_exists == 'false'

View File

@@ -41,8 +41,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install Surfer
run: npm i -g @zen-browser/surfer

View File

@@ -79,8 +79,8 @@ jobs:
- name: Setup Git
run: |
git config --global user.email "mauro-balades@users.noreply.github.com"
git config --global user.name "mauro-balades"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: |