From d42c82a5c9b65a51e9ff2d3a0e52b1471d092da4 Mon Sep 17 00:00:00 2001 From: 42atomys Date: Sat, 30 Nov 2024 03:17:48 +0100 Subject: [PATCH] chore(dependabot): run a tidy on benchmarks to avoid error --- .github/workflows/dependabot.yaml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/dependabot.yaml diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml new file mode 100644 index 0000000..e63418f --- /dev/null +++ b/.github/workflows/dependabot.yaml @@ -0,0 +1,39 @@ +name: Dependabot Actions +on: + push: + branches: + - dependabot/** + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.base_ref }} + +permissions: + contents: write + +jobs: + tidy_benchmarks: + name: Tidy Benchmarks + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.ORGANIZATION_ACTIONS_TOKEN }} + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.22.5' + - name: Run go mod tidy in benchmarks directory + working-directory: benchmarks + run: | + go mod tidy + if [[ -n $(git status --porcelain) ]]; then + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add go.mod go.sum + git commit -m "chore: run go mod tidy in benchmarks directory" + git push + else + echo "No changes to commit" + fi