Skip to content

Commit

Permalink
More reliable docker image check (#2403)
Browse files Browse the repository at this point in the history
  • Loading branch information
crystalin authored Jul 20, 2023
1 parent fb63014 commit ee07d2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
id: check-docker-image
run: |
TAG=sha-${{ steps.get-sha.outputs.sha8 }}
echo "image_exists=$(docker image inspect purestake/moonbeam:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT
echo "image_exists=$(docker buildx imagetools inspect --raw purestake/moonbeam:$TAG > /dev/null && echo "true" || echo "false")" >> $GITHUB_OUTPUT
- name: Display variables
run: |
echo git_ref: ${{ steps.check-git-ref.outputs.git_ref }}
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
POLKADOT_COMMIT=${{ needs.set-tags.outputs.polkadot_commit }}
DOCKER_TAG="purestake/moonbase-relay-testnet:sha-$POLKADOT_COMMIT"
POLKADOT_EXISTS=$(docker image inspect $DOCKER_TAG > /dev/null && \
POLKADOT_EXISTS=$(docker buildx imagetools inspect --raw $DOCKER_TAG > /dev/null && \
echo "true" || echo "false")
if [[ "$POLKADOT_EXISTS" == "false" ]]; then
# $POLKADOT_COMMIT and $POLKADOT_REPO is used to build the relay image
Expand All @@ -273,7 +273,7 @@ jobs:
POLKADOT_COMMIT=${{ needs.set-tags.outputs.polkadot_commit }}
DOCKER_TAG="docker.io/purestake/polkadot-para-tests:sha-$POLKADOT_COMMIT"
POLKADOT_EXISTS=$(docker image inspect $DOCKER_TAG > /dev/null && \
POLKADOT_EXISTS=$(docker buildx imagetools inspect --raw $DOCKER_TAG > /dev/null && \
echo "true" || echo "false")
if [[ "$POLKADOT_EXISTS" == "false" ]]; then
mkdir -p build
Expand Down

0 comments on commit ee07d2a

Please sign in to comment.