mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
fix: docker should always run, even in forks (#26801)
This commit is contained in:
committed by
GitHub
parent
424b4c2378
commit
845bcc9bea
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
@@ -8,27 +8,7 @@ on:
|
||||
types: [synchronize, opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
env:
|
||||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
run: |
|
||||
if [[ -n "$DOCKERHUB_USER" && -n "$DOCKERHUB_TOKEN" ]]; then
|
||||
echo "has-secrets=true" >> "$GITHUB_ENV"
|
||||
echo "has secrets!"
|
||||
else
|
||||
echo "has-secrets=false" >> "$GITHUB_ENV"
|
||||
echo "no secrets!"
|
||||
fi
|
||||
docker-build:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets == 'true'
|
||||
name: docker-build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -63,9 +43,8 @@ jobs:
|
||||
run: |
|
||||
./scripts/docker_build_push.sh "" ${{ matrix.target }} ${{ matrix.platform }}
|
||||
|
||||
|
||||
ephemeral-docker-build:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets
|
||||
name: docker-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user