Skip to content

Commit

Permalink
Always push dev image (#59)
Browse files Browse the repository at this point in the history
* always rebuild and push dev image
  • Loading branch information
ankudinov authored Nov 14, 2024
1 parent d6ff0fc commit afb0dc0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/container_build_child.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ jobs:
id: check-image
run: |
echo "exit_code=0" >> $GITHUB_OUTPUT
IFS=',' read -ra image_tags <<< ${{ steps.build-tags.outputs.image_tags }}
for image_tag in "${image_tags[@]}"; do
echo "Checking if ghcr.io/${{ steps.gh_repo.outputs.name_lowcase }}/${{ inputs.container_name }}:$image_tag already exists."
docker manifest inspect ghcr.io/${{ steps.gh_repo.outputs.name_lowcase }}/${{ inputs.container_name }}:$image_tag || echo "exit_code=1" >> $GITHUB_OUTPUT
done
if [ "${{ inputs.container_name }}" == "dev" ]; then
# always rebuild dev image, but check if already exists for other images
echo "exit_code=1" >> $GITHUB_OUTPUT
else
IFS=',' read -ra image_tags <<< ${{ steps.build-tags.outputs.image_tags }}
for image_tag in "${image_tags[@]}"; do
echo "Checking if ghcr.io/${{ steps.gh_repo.outputs.name_lowcase }}/${{ inputs.container_name }}:$image_tag already exists."
docker manifest inspect ghcr.io/${{ steps.gh_repo.outputs.name_lowcase }}/${{ inputs.container_name }}:$image_tag || echo "exit_code=1" >> $GITHUB_OUTPUT
done
fi
- name: Pre-build dev container image 🔨
uses: devcontainers/[email protected]
Expand Down

0 comments on commit afb0dc0

Please sign in to comment.