mirror of
https://github.com/alexgo-io/stacks-subnets.git
synced 2026-01-12 08:34:47 +08:00
ci: Add explicit != '' comparisons to test if strings are non-empty
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -240,7 +240,7 @@ jobs:
|
||||
add_git_labels: true
|
||||
build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
|
||||
# Only push if ( we have DockerHub credentials and ((a tag was passed in) or (we're building a non-master branch))
|
||||
push: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && (github.event.inputs.tag || (github.ref != 'refs/heads/master')) }}
|
||||
push: ${{ (secrets.DOCKERHUB_USERNAME != '') && (secrets.DOCKERHUB_PASSWORD != '') && ((github.event.inputs.tag != '') || (github.ref != 'refs/heads/master')) }}
|
||||
|
||||
# Build docker image, tag it with the git tag and `latest` if running on master branch, and publish under the following conditions
|
||||
# Will publish if:
|
||||
@@ -284,4 +284,4 @@ jobs:
|
||||
add_git_labels: true
|
||||
build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
|
||||
# Only push if ( we have DockerHub credentials and ((a tag was passed in) or (we're building a non-master branch))
|
||||
push: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && (github.event.inputs.tag || (github.ref != 'refs/heads/master')) }}
|
||||
push: ${{ (secrets.DOCKERHUB_USERNAME != '') && (secrets.DOCKERHUB_PASSWORD != '') && ((github.event.inputs.tag != '') || (github.ref != 'refs/heads/master')) }}
|
||||
|
||||
Reference in New Issue
Block a user