Skip to content

Commit

Permalink
Fix fetch-chrome-webstore-access-token action
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Jul 2, 2024
1 parent b6b5742 commit 99a6509
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/chrome-token.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@ on:
- cron: '0 3 2 * *' # At 03:00 on day-of-month 2

jobs:
check-secret:
runs-on: ubuntu-latest
outputs:
secrets: ${{ steps.key-check.outputs.defined }}
steps:
- name: Check for Secret availability
id: key-check
shell: bash
run: |
if [ "${{ secrets.CHROME_CLIENT_ID }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
fetchToken:
runs-on: ubuntu-latest
env:
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
if: ${{ env.CHROME_CLIENT_ID }}
needs: [check-secret]
if: needs.check-secret.outputs.secrets == 'true'

steps:
- uses: cardinalby/google-api-fetch-token-action@v1
Expand Down

0 comments on commit 99a6509

Please sign in to comment.