fix(ci): Fix GitHub workflow behavior for forks (#23117)

This commit is contained in:
Josh Soref
2023-04-14 11:23:00 -04:00
committed by GitHub
parent da5f7155c6
commit 47fd73255e
30 changed files with 281 additions and 56 deletions

View File

@@ -6,13 +6,28 @@ on:
- 'master'
jobs:
config:
runs-on: "ubuntu-latest"
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.NPM_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
build:
needs: config
if: needs.config.outputs.has-secrets
runs-on: ubuntu-20.04
defaults:
run:
working-directory: superset-embedded-sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "16"