ci: dont run docker stuff if not a PR *and* both env variables are not empty
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
ed5be58f9f
commit
e75fb17899
1 changed files with 2 additions and 2 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -184,7 +184,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
||||||
if: ${{ (github.event_name != 'pull_request') || ((env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '')) }}
|
if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
# username is not really a secret
|
# username is not really a secret
|
||||||
|
@ -209,7 +209,7 @@ jobs:
|
||||||
IMAGE_NAME: docker.io/${{ github.repository }}
|
IMAGE_NAME: docker.io/${{ github.repository }}
|
||||||
IMAGE_SUFFIX_AMD64: amd64
|
IMAGE_SUFFIX_AMD64: amd64
|
||||||
IMAGE_SUFFIX_ARM64V8: arm64v8
|
IMAGE_SUFFIX_ARM64V8: arm64v8
|
||||||
if: ${{ (github.event_name != 'pull_request') || ((env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '')) }}
|
if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }}
|
||||||
run: |
|
run: |
|
||||||
docker load -i oci-image-amd64.tar.gz
|
docker load -i oci-image-amd64.tar.gz
|
||||||
IMAGE_ID_AMD64=$(docker images -q conduit:main)
|
IMAGE_ID_AMD64=$(docker images -q conduit:main)
|
||||||
|
|
Loading…
Add table
Reference in a new issue