Skip to content

Commit 6bed32c

Browse files
SniderVirgil
andcommitted
ci: add Core ecosystem CI workflow with CodeRabbit auto-fix
Uses dAppCore/build actions for test, auto-fix on CodeRabbit changes, and auto-merge on CodeRabbit approval. Co-Authored-By: Virgil <virgil@lethean.io>
1 parent 9866ad3 commit 6bed32c

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main]
8+
pull_request_review:
9+
types: [submitted]
10+
11+
jobs:
12+
test:
13+
if: github.event_name != 'pull_request_review'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dAppCore/build/actions/build/core@dev
18+
with:
19+
go-version: "1.26"
20+
run-vet: "true"
21+
22+
auto-fix:
23+
if: >
24+
github.event_name == 'pull_request_review' &&
25+
github.event.review.user.login == 'coderabbitai' &&
26+
github.event.review.state == 'changes_requested'
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: write
30+
pull-requests: write
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.event.pull_request.head.ref }}
35+
fetch-depth: 0
36+
- uses: dAppCore/build/actions/fix@dev
37+
with:
38+
go-version: "1.26"
39+
40+
auto-merge:
41+
if: >
42+
github.event_name == 'pull_request_review' &&
43+
github.event.review.user.login == 'coderabbitai' &&
44+
github.event.review.state == 'approved'
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: write
48+
pull-requests: write
49+
steps:
50+
- uses: actions/checkout@v4
51+
- name: Merge PR
52+
run: gh pr merge ${{ github.event.pull_request.number }} --merge --delete-branch
53+
env:
54+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)