From 56050c703ea7b754c9e7c4fa57c5f39e98413c9a Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:57:33 -0400 Subject: [PATCH] chore(ci): reduce dependabot spam by splitting out updates --- .github/dependabot.yml | 50 ++++++++++++++++++++- .github/workflows/semantic_pull_request.yml | 20 +++++++++ .github/workflows/semantic_release.yml | 24 ++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/semantic_pull_request.yml create mode 100644 .github/workflows/semantic_release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 14c2668..a7f2261 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,50 @@ version: 2 updates: + # Rollkit specific updates + # Trigger daily, group minor and patch updates - package-ecosystem: github-actions directory: "/" schedule: interval: daily + allow: + - dependency-name: "rollkit/*" + labels: + - T:dependencies + groups: + patch-updates: + applies-to: version-updates + update-types: + - "patch" + - "minor" + - package-ecosystem: gomod + directory: "/" + schedule: + interval: daily + allow: + - dependency-name: "github.com/rollkit/*" + labels: + - T:dependencies + # Group all patch updates into a single PR + groups: + patch-updates: + applies-to: version-updates + update-types: + - "patch" + - "minor" + # All other dependencies + # Trigger weekly, group patch updates + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly open-pull-requests-limit: 10 labels: - T:dependencies + groups: + patch-updates: + applies-to: version-updates + update-types: + - "patch" - package-ecosystem: gomod directory: "/" schedule: @@ -14,10 +52,20 @@ updates: open-pull-requests-limit: 10 labels: - T:dependencies + groups: + patch-updates: + applies-to: version-updates + update-types: + - "patch" - package-ecosystem: docker - directory: "/docker" + directory: "/" schedule: interval: weekly open-pull-requests-limit: 10 labels: - T:dependencies + groups: + patch-updates: + applies-to: version-updates + update-types: + - "patch" diff --git a/.github/workflows/semantic_pull_request.yml b/.github/workflows/semantic_pull_request.yml new file mode 100644 index 0000000..e11fe30 --- /dev/null +++ b/.github/workflows/semantic_pull_request.yml @@ -0,0 +1,20 @@ +name: Semantic Pull Request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + main: + name: conventional-commit-pr-title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/semantic_release.yml b/.github/workflows/semantic_release.yml new file mode 100644 index 0000000..c5f1d5d --- /dev/null +++ b/.github/workflows/semantic_release.yml @@ -0,0 +1,24 @@ +name: Semantic Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Configure Semantic Release + # Work around for non npm project + # REF: https://github.com/cycjimmy/semantic-release-action/issues/115#issuecomment-1817264419 + run: echo '{"branches":[],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/github"]}' > .releaserc.json + - name: Create Release + uses: cycjimmy/semantic-release-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branches: | + ["main"]