on main help sign in
ci: dependabot, sync and lint jobs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit1656bc14a7c1a49b939e7ba082a822d6fbeb4737 authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateMon 21 Jul 2025, 10:39 (1 year ago) parent89e3122
4 files changed+78
.github/dependabot.yml+28 .github/workflows/build.yml+19 .github/workflows/dependabot-sync.yml+17 .github/workflows/lint-sync.yml+14
.github/dependabot.ymlnew file+28
@@ -0,0 +1,28 @@
1+version: 2
2+
3+updates:
4+ - package-ecosystem: "gomod"
5+ directory: "/"
6+ schedule:
7+ interval: "weekly"
8+ day: "monday"
9+ time: "05:00"
10+ timezone: "America/New_York"
11+ labels:
12+ - "dependencies"
13+ commit-message:
14+ prefix: "chore"
15+ include: "scope"
16+
17+ - package-ecosystem: "github-actions"
18+ directory: "/"
19+ schedule:
20+ interval: "weekly"
21+ day: "monday"
22+ time: "05:00"
23+ timezone: "America/New_York"
24+ labels:
25+ - "dependencies"
26+ commit-message:
27+ prefix: "chore"
28+ include: "scope"
.github/workflows/build.yml+19
@@ -9,3 +9,22 @@ jobs:
99 go-version-file: ./go.mod
1010 secrets:
1111 gh_pat: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
12+
13+ dependabot:
14+ needs: [build]
15+ runs-on: ubuntu-latest
16+ permissions:
17+ pull-requests: write
18+ contents: write
19+ if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
20+ steps:
21+ - id: metadata
22+ uses: dependabot/fetch-metadata@v2
23+ with:
24+ github-token: "${{ secrets.GITHUB_TOKEN }}"
25+ - run: |
26+ gh pr review --approve "$PR_URL"
27+ gh pr merge --squash --auto "$PR_URL"
28+ env:
29+ PR_URL: ${{github.event.pull_request.html_url}}
30+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
.github/workflows/dependabot-sync.ymlnew file+17
@@ -0,0 +1,17 @@
1+name: dependabot-sync
2+on:
3+ schedule:
4+ - cron: "0 0 * * 0" # every Sunday at midnight
5+ workflow_dispatch: # allows manual triggering
6+
7+permissions:
8+ contents: write
9+ pull-requests: write
10+
11+jobs:
12+ dependabot-sync:
13+ uses: charmbracelet/meta/.github/workflows/dependabot-sync.yml@main
14+ with:
15+ repo_name: ${{ github.event.repository.name }}
16+ secrets:
17+ gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
.github/workflows/lint-sync.ymlnew file+14
@@ -0,0 +1,14 @@
1+name: lint-sync
2+on:
3+ schedule:
4+ # every Sunday at midnight
5+ - cron: "0 0 * * 0"
6+ workflow_dispatch: # allows manual triggering
7+
8+permissions:
9+ contents: write
10+ pull-requests: write
11+
12+jobs:
13+ lint:
14+ uses: charmbracelet/meta/.github/workflows/lint-sync.yml@main