From be1236b9a1cb7d013ab89d27d39aed26fea5f137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Ch=C3=A1vez?= Date: Mon, 9 Oct 2023 12:26:04 +0200 Subject: [PATCH] Fixes dependabot ci (#885) * chore: makes a better fix to dependabot formatting. Currently we are aiming to ammend the PR with format changes right after it's been opened, however that is inconvenient because a change in this workflow won't trigger the command. * chore: nit. --- .github/workflows/fix-dependabot.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fix-dependabot.yml b/.github/workflows/fix-dependabot.yml index b0ca2fd9f..045aa84ee 100644 --- a/.github/workflows/fix-dependabot.yml +++ b/.github/workflows/fix-dependabot.yml @@ -1,7 +1,7 @@ name: Fixes dependabot lint on: pull_request: - types: [opened] + types: [opened, synchronize] branches: - main jobs: @@ -17,8 +17,12 @@ jobs: cache: true - name: Format code run: go run mage.go format + - name: Check for uncommitted changes + id: check-uncommited + uses: mskri/check-uncommitted-changes-action@v1.0.1 - name: Commit and push changes + if: steps.check-uncommited.outputs.outcome == failure() uses: devops-infra/action-commit-push@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - ammend: true + commit_message: "chore: run mage format"