From 131c7b94d678657b6a88f52fd90e1e4b03779d97 Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Tue, 18 Jun 2024 12:55:50 +0200 Subject: [PATCH] feat(workflow): Add Duster Fix workflow - Introduces a workflow to prevent triggering actions on commits - Utilizes Duster's documentation for guidance - Implements steps to fix and ignore Duster commits in git blame --- .github/workflows/duster-fix-blame.yml | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/duster-fix-blame.yml diff --git a/.github/workflows/duster-fix-blame.yml b/.github/workflows/duster-fix-blame.yml new file mode 100644 index 0000000..227c13c --- /dev/null +++ b/.github/workflows/duster-fix-blame.yml @@ -0,0 +1,43 @@ +name: Duster Fix + +# Commits made in here will not trigger any workflows +# Checkout Duster's documentation for a workaround + +on: + push: + branches: [ main ] + pull_request: + +jobs: + duster: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: "Duster Fix" + uses: tighten/duster-action@v3 + with: + args: fix + + - uses: stefanzweifel/git-auto-commit-action@v5 + id: auto_commit_action + with: + commit_message: Dusting + commit_user_name: GitHub Action + commit_user_email: actions@github.com + + - name: Ignore Duster commit in git blame + if: steps.auto_commit_action.outputs.changes_detected == 'true' + run: echo ${{ steps.auto_commit_action.outputs.commit_hash }} >> .git-blame-ignore-revs + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Ignore Dusting commit in git blame + commit_user_name: GitHub Action + commit_user_email: actions@github.com