From 55b1306d76fb025fdf4582e78d044c62d1a266e4 Mon Sep 17 00:00:00 2001 From: iyear Date: Sat, 9 Nov 2024 20:04:55 +0800 Subject: [PATCH] fix(actions): dependabot monorepo tidy modules --- .github/dependabot.yml | 4 ++-- .github/workflows/dependabot-fix.yml | 32 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dependabot-fix.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 21d34ae26..81d63360e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,8 +8,8 @@ updates: - package-ecosystem: "gomod" # See documentation for possible values directories: - "/" - - "core" - - "extension" + - "/core" + - "/extension" schedule: interval: "daily" assignees: diff --git a/.github/workflows/dependabot-fix.yml b/.github/workflows/dependabot-fix.yml new file mode 100644 index 000000000..f87d6c8fa --- /dev/null +++ b/.github/workflows/dependabot-fix.yml @@ -0,0 +1,32 @@ +name: dependabot-fix + +on: + pull_request: + branches: + - dependabot/go_modules/** + push: + branches: + - dependabot/go_modules/** + +jobs: + tidy: + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Golang env + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + - uses: evantorrie/mott-the-tidier@v1-beta + with: + # mod tidy all modules except docs(hugo module) + gomods: | + **/go.mod + -docs/go.mod + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore(deps): tidy modules"