From 666ed20c70f0c6ff37423b12fb0d0560ae2da423 Mon Sep 17 00:00:00 2001 From: "awf-autoware-bot[bot]" <94889083+awf-autoware-bot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 09:57:31 +0900 Subject: [PATCH] chore: sync files (#713) Signed-off-by: GitHub Co-authored-by: kenji-miyake --- .github/workflows/pre-commit.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index e1b72f706881c..7fd1cc90fe97d 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -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 }}