mirror of
https://github.com/docker/build-push-action
synced 2024-11-13 23:01:42 +00:00
ci: test digest without output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
be4bf1099e
commit
0681013357
1 changed files with 12 additions and 9 deletions
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
@ -735,12 +735,6 @@ jobs:
|
||||||
- driver: docker-container
|
- driver: docker-container
|
||||||
load: true
|
load: true
|
||||||
push: true
|
push: true
|
||||||
- driver: docker
|
|
||||||
load: false
|
|
||||||
push: false
|
|
||||||
- driver: docker-container
|
|
||||||
load: false
|
|
||||||
push: false
|
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry:2
|
||||||
|
@ -774,9 +768,13 @@ jobs:
|
||||||
docker image ls --no-trunc
|
docker image ls --no-trunc
|
||||||
-
|
-
|
||||||
name: Check digest
|
name: Check digest
|
||||||
if: ${{ matrix.push }}
|
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
if [[ "${{ matrix.driver }}" = "docker-container" ]] && [[ "${{ matrix.load }}" = "false" ]] && [[ "${{ matrix.push }}" = "false" ]]; then
|
||||||
|
if [ -n "${{ steps.docker_build.outputs.digest }}" ]; then
|
||||||
|
echo "::error::Digest should be empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [[ "${{ matrix.push }}" = "true" ]] && [[ -z "${{ steps.docker_build.outputs.digest }}" ]]; then
|
||||||
echo "::error::Digest should not be empty"
|
echo "::error::Digest should not be empty"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -789,7 +787,12 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Check image ID
|
name: Check image ID
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${{ steps.docker_build.outputs.imageid }}" ]; then
|
if [[ "${{ matrix.driver }}" = "docker-container" ]] && [[ "${{ matrix.load }}" = "false" ]] && [[ "${{ matrix.push }}" = "false" ]]; then
|
||||||
|
if [ -n "${{ steps.docker_build.outputs.imageid }}" ]; then
|
||||||
|
echo "::error::Image ID should be empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ -z "${{ steps.docker_build.outputs.imageid }}" ]; then
|
||||||
echo "::error::Image ID should not be empty"
|
echo "::error::Image ID should not be empty"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue