From 61ed6d42e252a6a78fdc9133530c9ff5648af3be Mon Sep 17 00:00:00 2001 From: h4 Date: Thu, 17 Jul 2025 13:32:56 +0200 Subject: [PATCH 1/5] Add create patches workflow --- .github/workflows/create-patches.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/create-patches.yml diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml new file mode 100644 index 0000000..08259ee --- /dev/null +++ b/.github/workflows/create-patches.yml @@ -0,0 +1,27 @@ +name: Create Patches + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + generate-patches: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install build dependencies + run: sudo apt-get update && sudo apt-get install -y make + + - name: Run make create-patch + run: make create-patch + + - name: Upload patch files as artifact + uses: actions/upload-artifact@v4 + with: + name: split-patches + path: patches/ From fa1fa53a702d040b9701b89ae42158ec7479dfb2 Mon Sep 17 00:00:00 2001 From: h4 Date: Thu, 17 Jul 2025 13:35:39 +0200 Subject: [PATCH 2/5] Update create-patches.yml --- .github/workflows/create-patches.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml index 08259ee..77e034d 100644 --- a/.github/workflows/create-patches.yml +++ b/.github/workflows/create-patches.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install build dependencies run: sudo apt-get update && sudo apt-get install -y make From fe30ba443b3a605b0c3ad32264531ab64e51b45c Mon Sep 17 00:00:00 2001 From: h4 Date: Thu, 17 Jul 2025 13:43:14 +0200 Subject: [PATCH 3/5] Update create-patches.yml --- .github/workflows/create-patches.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml index 77e034d..ad73318 100644 --- a/.github/workflows/create-patches.yml +++ b/.github/workflows/create-patches.yml @@ -22,6 +22,19 @@ jobs: - name: Run make create-patch run: make create-patch + - name: Commit and push patch files + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + + if [ -n "$(git status --porcelain patches/)" ]; then + git add patches/ + git commit -m "chore: update patches from latest commit [skip ci]" + git push + else + echo "No changes in patches/ to commit." + fi + - name: Upload patch files as artifact uses: actions/upload-artifact@v4 with: From 7b72d16838f61eb148b84d7f8a3ca1aa7da7595a Mon Sep 17 00:00:00 2001 From: h4 Date: Thu, 17 Jul 2025 13:45:46 +0200 Subject: [PATCH 4/5] Update create-patches.yml --- .github/workflows/create-patches.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml index ad73318..43b70b6 100644 --- a/.github/workflows/create-patches.yml +++ b/.github/workflows/create-patches.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.ref_name }} - name: Install build dependencies run: sudo apt-get update && sudo apt-get install -y make @@ -30,10 +31,12 @@ jobs: if [ -n "$(git status --porcelain patches/)" ]; then git add patches/ git commit -m "chore: update patches from latest commit [skip ci]" - git push + git push origin HEAD:${GITHUB_REF_NAME} else echo "No changes in patches/ to commit." fi + env: + GITHUB_REF_NAME: ${{ github.ref_name }} - name: Upload patch files as artifact uses: actions/upload-artifact@v4 From 3bb838b6dd60d9b4d5242687105597427b814c89 Mon Sep 17 00:00:00 2001 From: h4 Date: Thu, 17 Jul 2025 13:47:44 +0200 Subject: [PATCH 5/5] Update create-patches.yml --- .github/workflows/create-patches.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml index 43b70b6..3f8c07b 100644 --- a/.github/workflows/create-patches.yml +++ b/.github/workflows/create-patches.yml @@ -3,8 +3,6 @@ name: Create Patches on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] jobs: generate-patches: