balena-io / deploy-to-balena-action

Official Github action to deploy releases to balenaCloud environments
Apache License 2.0
38 stars 13 forks source link

Move the deploy test action to a custom flowzone test #253

Closed thgreasi closed 1 year ago

thgreasi commented 1 year ago

Change-type: patch

klutchell commented 1 year ago

@thgreasi I was wrong, since we are looking for the published docker image this should actually be a custom publish step that runs after docker publish.

thgreasi commented 1 year ago

Fine @klutchell let me try it

klutchell commented 1 year ago

Hmm, it looks like custom publish runs at the same time as docker publish in Flowzone, so the image is not available yet.

We could change the Flowzone behaviour, or add a wait loop to keep inspecting the manifest until it is available.

klutchell commented 1 year ago

something like

image="ghcr.io/balena-io/deploy-to-balena-action:${{ github.event.pull_request.head.sha }}"
while ! docker buildx imagetools inspect "${image}" >/dev/null 2>&1
do
  echo "waiting for ${image}..."
  sleep $(((RANDOM % 10) + 10))
done
klutchell commented 1 year ago

LGTM

thgreasi commented 1 year ago

you are awesome @klutchell :clap: