From f06142c9439166ff527bd4372c7f907e738b90e9 Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Fri, 8 Nov 2024 17:50:48 +0900 Subject: [PATCH] fix: check env variables and default if missing --- .github/workflows/no-empty-strings.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/no-empty-strings.yml b/.github/workflows/no-empty-strings.yml index c303cc2..fa688bc 100644 --- a/.github/workflows/no-empty-strings.yml +++ b/.github/workflows/no-empty-strings.yml @@ -14,11 +14,15 @@ jobs: with: node-version: "20.10.0" - name: Get GitHub App token + if: ${{ env.APP_ID && env.APP_PRIVATE_KEY }} uses: tibdex/github-app-token@v1.7.0 id: get_installation_token with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} + env: + APP_ID: ${{ secrets.APP_ID }} + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} - name: Install Dependencies run: | yarn add tsx simple-git @@ -26,7 +30,7 @@ jobs: run: | yarn tsx .github/empty-string-checker.ts env: - GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }} + GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token || secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} GITHUB_BASE_REF: ${{ github.base_ref }}