Skip to content

Commit

Permalink
feat: add sync config and update source files
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Dec 3, 2024
1 parent 431029c commit 5a161e7
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 44 deletions.
23 changes: 9 additions & 14 deletions .github/auto_request_review.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# More info at https://github.com/necojackarc/auto-request-review
# DO NOT EDIT DIRECTLY
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO
reviewers:
# The default reviewers
defaults:
# Example of Github Team. Github team must have write access to repo.
# NOTE: This assigned the team itself, not members of the team.
# - team:engineering # This is the Github Team
- MSevey

- rollkit
groups:
rollkit:
- team:core
files:
".github/**":
- MSevey

- rollkit
options:
ignore_draft: true
ignored_keywords:
- DO NOT REVIEW
enable_group_assignment: false

# Randomly pick reviewers up to this number.
# Do not set this option if you'd like to assign all matching reviewers.
number_of_reviewers: 2
- WIP
number_of_reviewers: 3

Check failure on line 17 in .github/auto_request_review.yml

View workflow job for this annotation

GitHub Actions / yamllint

17:25 [new-line-at-end-of-file] no new line character at the end of file
20 changes: 20 additions & 0 deletions .github/dependabot.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# DO NOT EDIT DIRECTLY
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO
version: 2
updates:
{% for dep in deps %}
- package-ecosystem: {{dep.ecosystem}}
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
patch-updates:
applies-to: version-updates
update-types:
- "patch"
- "minor"
commit-message:
include: "scope"
prefix: "build"
{% endfor %}
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ updates:
update-types:
- "patch"
- "minor"
# Including this due to certain github action steps installing via npm
- package-ecosystem: npm
directory: "/"
schedule:
Expand Down
105 changes: 105 additions & 0 deletions .github/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Use individual repo settings for files that differ
rollkit/.github:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "docker" }, { ecosystem: "github-actions" }, { ecosystem: "npm" }]

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:15 [braces] too many spaces inside braces

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:35 [braces] too many spaces inside braces

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:40 [braces] too many spaces inside braces

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:68 [braces] too many spaces inside braces

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:73 [braces] too many spaces inside braces

Check failure on line 6 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:90 [braces] too many spaces inside braces
rollkit/astria-sequencer:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]

Check failure on line 11 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

11:15 [braces] too many spaces inside braces

Check failure on line 11 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

11:34 [braces] too many spaces inside braces

Check failure on line 11 in .github/sync.yml

View workflow job for this annotation

GitHub Actions / yamllint

11:39 [braces] too many spaces inside braces
rollkit/avail-da:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/based-sequencer:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "docker" }, { ecosystem: "github-actions" }]
rollkit/bitcoin-da:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/centralized-sequencer:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "docker" }, { ecosystem: "github-actions" }]
rollkit/cosmos-sdk-starter:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/docs:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "npm" }, { ecosystem: "github-actions" }]
rollkit/go-da:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/go-execution:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/go-execution-abci:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/go-execution-evm:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/go-sequencing:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]
rollkit/local-da:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "docker" }, { ecosystem: "github-actions" }]
rollkit/rollkit:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "docker" }, { ecosystem: "github-actions" }]
rollkit/template-da-repo:
- source: .github/dependabot.njk
dest: .github/dependabot.yml
template:
deps: [{ ecosystem: "gomod" }, { ecosystem: "github-actions" }]

# Use groups for common files that have no differences
group:
repos: |
rollkit/astria-sequencer
rollkit/avail-da
rollkit/based-sequencer
rollkit/bitcoin-da
rollkit/centralized-sequencer
rollkit/cosmos-sdk-starter
rollkit/docs
rollkit/go-da
rollkit/go-execution
rollkit/go-execution-abci
rollkit/go-execution-evm
rollkit/go-sequencing
rollkit/local-da
rollkit/rollkit
rollkit/template-da-repo
files:
- .github/workflows/approve_merge_bots.yml
- .github/workflows/semantic_pull_request.yml
- .github/workflows/semantic_release.yml
- .github/auto_request_review.yml
56 changes: 56 additions & 0 deletions .github/workflows/approve_merge_bots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# DO NOT EDIT DIRECTLY
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO
name: Approve and Merge Bot PRs
on:
pull_request:

jobs:
dependabot:
name: "Approve and Merge Dependabot PRs"
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: RollkitBot Approval
run: |
gh auth login --with-token <<< "$PAT"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
PAT: ${{secrets.PR_APPROVE_PAT_RB}}
- name: Sevey Approval
run: |
gh auth login --with-token <<< "$PAT"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
PAT: ${{secrets.PR_APPROVE_PAT_SEVEY}}

rollkitbot:
name: "Approve and Merge RollkitBot PRs"
if: ${{ github.actor == 'RollkitBot' && contains(github.event.pull_request.labels.*.name, 'action sync') }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Sevey Approval
run: |
gh auth login --with-token <<< "$PAT"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
PAT: ${{secrets.PR_APPROVE_PAT_SEVEY}}
- name: TBD Approval
run: |
gh auth login --with-token <<< "$PAT"
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
PAT: ${{secrets.PR_APPROVE_PAT_TBD}}
29 changes: 0 additions & 29 deletions .github/workflows/approve_merge_dependabot.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/semantic_pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# DO NOT EDIT DIRECTLY
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO
name: Semantic Pull Request

on:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# DO NOT EDIT DIRECTLY
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO
name: Semantic Release

on:
Expand Down

0 comments on commit 5a161e7

Please sign in to comment.