Skip to content

Commit 76c71f7

Browse files
committed
add GHA portion
1 parent 3002f60 commit 76c71f7

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ concurrency:
1313
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info.
1414
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}}
1515
cancel-in-progress: ${{ github.ref_name != 'main' }}
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
1621
jobs:
1722
test:
1823
runs-on: ubuntu-latest
@@ -31,7 +36,17 @@ jobs:
3136
- uses: actions/checkout@v5
3237
- uses: bazel-contrib/setup-bazel@0.18.0
3338
- run: bazel test //...
34-
39+
# Simulate what Aspect Workflows could do
40+
# Run the build with patches requested, then apply them and run the tests again
41+
- run: ./examples/test.sh //...
42+
if: failure()
43+
- run: |
44+
git config --global user.email "marvin@aspect.build"
45+
git config --global user.name "Marvin [bot]"
46+
git commit -a -m "fix: apply patches"
47+
git push
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3550
pre-commit:
3651
runs-on: ubuntu-latest
3752
steps:

examples/foo.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ package foo;
55
message Foo {
66
string name = 1;
77
string description = 2;
8+
int32 age = 3;
89
}

0 commit comments

Comments
 (0)