diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index f874238..27cb7cc 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -49,7 +49,7 @@ jobs: fi docker_file="Dockerfile" - base_image=$(grep 'FROM ' $docker_file | tail -1 | cut -f1 -d' ') + base_image=$(grep 'FROM ' $docker_file | tail -1 | cut -f2 -d' ') if [[ -z "$base_image" ]] ; then echo "::error::Can't extract base image info" @@ -75,23 +75,23 @@ jobs: echo -e "::group::\033[34mDownloading built image…\033[0m" if ! docker pull ghcr.io/${{env.IMAGE_NAME}}:latest ; then - echo "::error::Can't download image ${{env.IMAGE_NAME}}:latest" + echo "::error::Can't download image ghcr.io/${{env.IMAGE_NAME}}:latest" exit 1 fi echo "::endgroup::" echo -e "::group::\033[34mDownloading base image…\033[0m" - if ! docker pull ${{steps.metadata.outputs.base_image}} ; then - echo "::error::Can't download image ${{steps.metadata.outputs.base_image}}" + if ! docker pull ${{steps.metadata.outputs.baseimage}} ; then + echo "::error::Can't download image ${{steps.metadata.outputs.baseimage}}" exit 1 fi echo "::endgroup::" - base_layer=$(docker inspect "${{steps.metadata.outputs.base_image}}" | jq -r '.[0].RootFS.Layers[-1]') + base_layer=$(docker inspect "${{steps.metadata.outputs.baseimage}}" | jq -r '.[0].RootFS.Layers[-1]') - if [[ -z "$base_image" ]] ; then + if [[ -z "$base_layer" ]] ; then echo "::error::Can't extract layers info from base image" exit 1 fi