Skip to content

Commit

Permalink
ci(pre-commit): support autofix for private repositories (autowarefou…
Browse files Browse the repository at this point in the history
…ndation#179)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored Apr 16, 2022
1 parent bdbeefb commit d195332
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,28 @@ on:

jobs:
pre-commit:
if: ${{ github.event.repository.private }}
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ steps.generate-token.outputs.token }}

- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@v1
with:
pre-commit-config: .pre-commit-config.yaml
token: ${{ steps.generate-token.outputs.token }}

0 comments on commit d195332

Please sign in to comment.