mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
fix(ci): Fix GitHub workflow behavior for forks (#23117)
This commit is contained in:
19
.github/workflows/docker.yml
vendored
19
.github/workflows/docker.yml
vendored
@@ -8,13 +8,28 @@ on:
|
||||
types: [synchronize, opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
if: github.event.pull_request.draft == false
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ (secrets.DOCKERHUB_USER != '' && secrets.DOCKERHUB_TOKEN != '') || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
docker-build:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets
|
||||
name: docker-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user