From 2dbb7df8450230656450c8af91ea50542010090f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E7=8C=AB?= Date: Fri, 12 Aug 2022 05:26:12 +0900 Subject: [PATCH] Use app token when push --- .github/workflows/npm-update.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml index e3d29bd..1587b0b 100644 --- a/.github/workflows/npm-update.yml +++ b/.github/workflows/npm-update.yml @@ -11,7 +11,14 @@ jobs: timeout-minutes: 5 steps: + - id: generate_token + uses: tibdex/github-app-token@v1.6.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} - uses: actions/checkout@v3 + with: + token: ${{ steps.generate_token.outputs.token }} - name: Versions run: | set -x @@ -45,11 +52,6 @@ jobs: git commit -m 'npm update' git push --force --set-upstream origin dependencies/npm-update if: steps.diff.outcome == 'failure' - - id: generate_token - uses: tibdex/github-app-token@v1.6.0 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - name: Create PR run: | set -x