Skip to content

Commit

Permalink
Merge pull request #928 from crazy-max/ci-test-digest
Browse files Browse the repository at this point in the history
ci: test digest without output
  • Loading branch information
crazy-max committed Aug 11, 2023
2 parents be4bf10 + 0681013 commit 56932de
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,6 @@ jobs:
- driver: docker-container
load: true
push: true
- driver: docker
load: false
push: false
- driver: docker-container
load: false
push: false
services:
registry:
image: registry:2
Expand Down Expand Up @@ -774,9 +768,13 @@ jobs:
docker image ls --no-trunc
-
name: Check digest
if: ${{ matrix.push }}
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"
exit 1
fi
Expand All @@ -789,7 +787,12 @@ jobs:
-
name: Check image ID
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"
exit 1
fi
Expand Down

0 comments on commit 56932de

Please sign in to comment.