Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): reduce dependabot spam by splitting out updates #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,71 @@
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:
interval: weekly
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"
20 changes: 20 additions & 0 deletions .github/workflows/semantic_pull_request.yml
Original file line number Diff line number Diff line change
@@ -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 }}
24 changes: 24 additions & 0 deletions .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
@@ -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"]
Comment on lines +18 to +24
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Resolve contradiction in branch specifications.

The Create Release step looks good overall, using an up-to-date version of the semantic-release action and securely authenticating with GITHUB_TOKEN. However, there's a contradiction in branch specifications:

  1. In the Configure Semantic Release step, the .releaserc.json file has an empty branches array: "branches":[]
  2. In the Create Release step, "main" is specified as the only branch for releases:
    branches: |
      ["main"]

This contradiction could lead to unexpected behavior. To resolve this:

  1. Remove the branches specification from the Create Release step (lines 22-24).
  2. Update the .releaserc.json configuration in the Configure Semantic Release step to include the "main" branch:
-        run: echo '{"branches":[],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/github"]}' > .releaserc.json
+        run: echo '{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/github"]}' > .releaserc.json

This change will ensure consistent branch specification across the workflow.

Loading