forked from protocolbuffers/upb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Action to build generated files and push them to the `ge…
…nerated` branch. PiperOrigin-RevId: 438583959
- Loading branch information
1 parent
a5243ff
commit f32e79a
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Generate Files | ||
|
||
# After any push to the main branch, re-generate pregenerated files. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Merge generated branch with main | ||
run: cd ${{ github.workspace} && (git checkout generated || git checkout -b generated) && git merge --no-edit main | ||
- name: Rebuild generated CMake files | ||
run: cd ${{ github.workspace }} && bazel test cmake:test_generated_files || bazel-bin/cmake/test_generated_files --fix | ||
- name: Commit and push changes to generated files | ||
run: cd ${{ github.workspace }} && git add -A && git diff --staged --quiet || (git commit -am "Regenerated files" && git push) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
obj/ | ||
lib/ | ||
bazel-* | ||
_build | ||
.vscode |