From 9cc9a96c25016be6c257a1f3c9e582d095118938 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 28 Jun 2025 10:14:39 +0200 Subject: [PATCH] Update onpush_builder.yaml --- .github/workflows/onpush_builder.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/onpush_builder.yaml b/.github/workflows/onpush_builder.yaml index db0b4fe07..72b67adc6 100644 --- a/.github/workflows/onpush_builder.yaml +++ b/.github/workflows/onpush_builder.yaml @@ -203,3 +203,22 @@ jobs: pull: --rebase --autostash fetch: --force push: --force + + # 6. Revert if workflow fails + revert-on-failure: + if: failure() + needs: [detect-changed-addons, prebuild-sanitize, lint_config, build, make-changelog] + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Revert the triggering commit + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git revert --no-commit ${{ github.sha }} + git commit -m "Revert '${{ github.event.head_commit.message }}' [nobuild]" + git push origin master