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>
This commit is contained in:
parent
e6a3ba9810
commit
d3a47eaecc
1 changed files with 54 additions and 0 deletions
54
.github/workflows/ci.yml
vendored
Normal file
54
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, dev]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
if: github.event_name != 'pull_request_review'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dAppCore/build/actions/build/core@dev
|
||||||
|
with:
|
||||||
|
go-version: "1.26"
|
||||||
|
run-vet: "true"
|
||||||
|
|
||||||
|
auto-fix:
|
||||||
|
if: >
|
||||||
|
github.event_name == 'pull_request_review' &&
|
||||||
|
github.event.review.user.login == 'coderabbitai' &&
|
||||||
|
github.event.review.state == 'changes_requested'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: dAppCore/build/actions/fix@dev
|
||||||
|
with:
|
||||||
|
go-version: "1.26"
|
||||||
|
|
||||||
|
auto-merge:
|
||||||
|
if: >
|
||||||
|
github.event_name == 'pull_request_review' &&
|
||||||
|
github.event.review.user.login == 'coderabbitai' &&
|
||||||
|
github.event.review.state == 'approved'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Merge PR
|
||||||
|
run: gh pr merge ${{ github.event.pull_request.number }} --merge --delete-branch
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
Add table
Reference in a new issue