forked from wpilibsuite/allwpilib
-
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.
Use autofix.ci for /format and /pregen
- Loading branch information
1 parent
807dffe
commit 6ddd28f
Showing
1 changed file
with
73 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,73 @@ | ||
name: autofix.ci # needed to securely identify the workflow | ||
on: | ||
issue_comment: | ||
types: [ created ] | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
format: | ||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/format') | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
# - name: React Rocket | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# script: | | ||
# const {owner, repo} = context.issue | ||
# github.rest.reactions.createForIssueComment({ | ||
# owner, | ||
# repo, | ||
# comment_id: context.payload.comment.id, | ||
# content: "rocket", | ||
# }); | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: gradle/actions/wrapper-validation@v4 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
- name: Install wpiformat | ||
run: pip3 install wpiformat==2024.45 | ||
- name: Run wpiformat | ||
run: wpiformat | ||
- name: Run spotlessApply | ||
run: ./gradlew spotlessApply | ||
- uses: autofix-ci/action@v1 | ||
|
||
pregen: | ||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/pregen') | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
# - name: React Rocket | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# script: | | ||
# const {owner, repo} = context.issue | ||
# github.rest.reactions.createForIssueComment({ | ||
# owner, | ||
# repo, | ||
# comment_id: context.payload.comment.id, | ||
# content: "rocket", | ||
# }); | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Install jinja | ||
run: python -m pip install jinja2 | ||
- name: Install protobuf dependencies | ||
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler && wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.3/protoc-gen-quickbuf-1.3.3-linux-x86_64.exe && chmod +x protoc-gen-quickbuf-1.3.3-linux-x86_64.exe | ||
- name: Run pregen | ||
uses: ./.github/actions/pregen | ||
- name: delete protobuf dependencies | ||
run: rm protoc-gen-quickbuf-1.3.3-linux-x86_64.exe | ||
- uses: autofix-ci/action@v1 |