Skip to content

Commit

Permalink
Use autofix.ci for /format and /pregen
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz committed Dec 22, 2024
1 parent 807dffe commit 6ddd28f
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/autofix.yml
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

0 comments on commit 6ddd28f

Please sign in to comment.