Skip to content

Commit

Permalink
fix(docker): credentials issues around superset-cache in forks (#26772)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Jan 24, 2024
1 parent 0f59079 commit 73c6abd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:
steps:
- name: "Check for secrets"
id: check
shell: bash
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
if [ -n "${{ (secrets.DOCKERHUB_USER != '' && secrets.DOCKERHUB_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
if [[ -n "$DOCKERHUB_USER" && -n "$DOCKERHUB_TOKEN" ]]; then
echo "has-secrets=true" >> "$GITHUB_ENV"
echo "has secrets!"
else
echo "has-secrets=0" >> "$GITHUB_OUTPUT"
echo "has-secrets=false" >> "$GITHUB_ENV"
echo "no secrets!"
fi
docker-build:
needs: config
if: needs.config.outputs.has-secrets
if: needs.config.outputs.has-secrets == 'true'
name: docker-build
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit 73c6abd

Please sign in to comment.