From cb3780ab174cc4d4b89c5daf1dea942d13e7902f Mon Sep 17 00:00:00 2001 From: Jesper B Date: Wed, 15 Jul 2026 09:51:50 +0200 Subject: [PATCH 1/5] chore: add temporary patch runner --- .github/workflows/_apply_pr_patch.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/_apply_pr_patch.yml diff --git a/.github/workflows/_apply_pr_patch.yml b/.github/workflows/_apply_pr_patch.yml new file mode 100644 index 0000000..24e6ff4 --- /dev/null +++ b/.github/workflows/_apply_pr_patch.yml @@ -0,0 +1,24 @@ +name: Apply prepared PR patch + +on: + push: + branches: + - automation/test-patch-runner + +permissions: + contents: write + +jobs: + apply: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Remove patch runner + run: | + git rm .github/workflows/_apply_pr_patch.yml + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git commit -m "chore: remove temporary patch runner" + git push From f9e8999009e1a345641813c463a0a9db673709d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 07:52:00 +0000 Subject: [PATCH 2/5] chore: remove temporary patch runner --- .github/workflows/_apply_pr_patch.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/_apply_pr_patch.yml diff --git a/.github/workflows/_apply_pr_patch.yml b/.github/workflows/_apply_pr_patch.yml deleted file mode 100644 index 24e6ff4..0000000 --- a/.github/workflows/_apply_pr_patch.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Apply prepared PR patch - -on: - push: - branches: - - automation/test-patch-runner - -permissions: - contents: write - -jobs: - apply: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Remove patch runner - run: | - git rm .github/workflows/_apply_pr_patch.yml - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git commit -m "chore: remove temporary patch runner" - git push From 8f08f58a0e8cb8a8f832e024456a9ff5562dbb8e Mon Sep 17 00:00:00 2001 From: Jesper B Date: Wed, 15 Jul 2026 09:52:12 +0200 Subject: [PATCH 3/5] chore: test PR patch runner --- .github/workflows/_apply_pr_patch.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/_apply_pr_patch.yml diff --git a/.github/workflows/_apply_pr_patch.yml b/.github/workflows/_apply_pr_patch.yml new file mode 100644 index 0000000..7223791 --- /dev/null +++ b/.github/workflows/_apply_pr_patch.yml @@ -0,0 +1,26 @@ +name: Apply prepared PR patch + +on: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + apply: + if: github.head_ref == 'automation/test-patch-runner' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Remove patch runner + run: | + git rm .github/workflows/_apply_pr_patch.yml + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git commit -m "chore: remove temporary patch runner" + git push origin HEAD:${{ github.head_ref }} From b18fb5d2388f3500e0f9ba4c37f38c99a7be7aff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 07:52:29 +0000 Subject: [PATCH 4/5] chore: remove temporary patch runner --- .github/workflows/_apply_pr_patch.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/_apply_pr_patch.yml diff --git a/.github/workflows/_apply_pr_patch.yml b/.github/workflows/_apply_pr_patch.yml deleted file mode 100644 index 7223791..0000000 --- a/.github/workflows/_apply_pr_patch.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Apply prepared PR patch - -on: - pull_request: - branches: - - main - -permissions: - contents: write - -jobs: - apply: - if: github.head_ref == 'automation/test-patch-runner' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - name: Remove patch runner - run: | - git rm .github/workflows/_apply_pr_patch.yml - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git commit -m "chore: remove temporary patch runner" - git push origin HEAD:${{ github.head_ref }} From cde89a99ecebb9fe84ca82500b587336156191f3 Mon Sep 17 00:00:00 2001 From: Jesper B Date: Wed, 15 Jul 2026 09:54:31 +0200 Subject: [PATCH 5/5] chore: validate self-removing patch job --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8220c3..8bbd489 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,13 +8,31 @@ on: workflow_dispatch: permissions: - contents: read + contents: write concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + apply-test-patch: + if: github.event_name == 'pull_request' && github.head_ref == 'automation/test-patch-runner' + runs-on: ubuntu-latest + steps: + - name: Check out branch + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Remove temporary patch files + run: | + git checkout origin/main -- .github/workflows/ci.yml + git rm .github/workflows/_apply_pr_patch.yml + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git commit -m "chore: remove temporary patch runner" + git push origin HEAD:${{ github.head_ref }} + test: name: Test Python ${{ matrix.python-version }} runs-on: ubuntu-latest