File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,20 @@ jobs:
15
15
steps :
16
16
- name : " Check for secrets"
17
17
id : check
18
- shell : bash
18
+ env :
19
+ DOCKERHUB_USER : ${{ secrets.DOCKERHUB_USER }}
20
+ DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
19
21
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 "
22
24
echo "has secrets!"
23
25
else
24
- echo "has-secrets=0 " >> "$GITHUB_OUTPUT "
26
+ echo "has-secrets=false " >> "$GITHUB_ENV "
25
27
echo "no secrets!"
26
28
fi
27
29
docker-build :
28
30
needs : config
29
- if : needs.config.outputs.has-secrets
31
+ if : needs.config.outputs.has-secrets == 'true'
30
32
name : docker-build
31
33
runs-on : ubuntu-latest
32
34
strategy :
You can’t perform that action at this time.
0 commit comments