File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2020 runs-on : ubuntu-latest
2121 outputs :
2222 VERSION : ${{ steps.version.outputs.VERSION }}
23+ GH_ENVIRONMENT : ${{ steps.version.outputs.GH_ENVIRONMENT }}
2324 steps :
2425 - name : Define version
2526 id : version
@@ -38,10 +39,16 @@ jobs:
3839 echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
3940 fi
4041 echo "set VERSION=${VERSION}"
42+ if [[ ${GITHUB_EVENT_NAME} == "push" && ${GITHUB_REF} == "refs/heads/main" ]]
43+ then
44+ export GH_ENVIRONMENT="dockerhub"
45+ else
46+ export GH_ENVIRONMENT="default"
47+ fi
4148 docker-build :
4249 runs-on : ubuntu-latest
4350 timeout-minutes : 10
44- environment : ${ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'dockerhub' || 'default' }
51+ environment : ${{ needs.set-variables.outputs.GH_ENVIRONMENT } }
4552 needs : [set-variables]
4653 strategy :
4754 fail-fast : false
You can’t perform that action at this time.
0 commit comments