Skip to content

Commit 73c6abd

Browse files
authored
fix(docker): credentials issues around superset-cache in forks (#26772)
1 parent 0f59079 commit 73c6abd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/docker.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ jobs:
1515
steps:
1616
- name: "Check for secrets"
1717
id: check
18-
shell: bash
18+
env:
19+
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
20+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
1921
run: |
20-
if [ -n "${{ (secrets.DOCKERHUB_USER != '' && secrets.DOCKERHUB_TOKEN != '') || '' }}" ]; then
21-
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
22+
if [[ -n "$DOCKERHUB_USER" && -n "$DOCKERHUB_TOKEN" ]]; then
23+
echo "has-secrets=true" >> "$GITHUB_ENV"
2224
echo "has secrets!"
2325
else
24-
echo "has-secrets=0" >> "$GITHUB_OUTPUT"
26+
echo "has-secrets=false" >> "$GITHUB_ENV"
2527
echo "no secrets!"
2628
fi
2729
docker-build:
2830
needs: config
29-
if: needs.config.outputs.has-secrets
31+
if: needs.config.outputs.has-secrets == 'true'
3032
name: docker-build
3133
runs-on: ubuntu-latest
3234
strategy:

0 commit comments

Comments
 (0)