-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,43 +41,43 @@ jobs: | |
# Default to building a new container under the original repo | ||
image_name=$head_image | ||
build=true | ||
build_image=true | ||
# Check if we can use the base image (Nabu Casa) | ||
if docker manifest inspect ${{ env.REGISTRY }}/$base_image:$tag_name; then | ||
image_name=$base_image | ||
build=false | ||
build_image=false | ||
fi | ||
# Check if we can use the head image (if this is a PR) | ||
if [[ $base_image != $head_image ]]; then | ||
if docker manifest inspect ${{ env.REGISTRY }}/$head_image:$tag_name; then | ||
image_name=$head_image | ||
build=false | ||
build_image=false | ||
fi | ||
fi | ||
echo "build=$build" >> $GITHUB_OUTPUT | ||
echo "build_image=$build_image" >> $GITHUB_OUTPUT | ||
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT | ||
echo "image_name=$image_name" >> $GITHUB_OUTPUT | ||
echo "container_name=${{ env.REGISTRY }}/$image_name:$tag_name" >> $GITHUB_OUTPUT | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
if: steps.create-container-info.outputs.build == 'true' | ||
if: steps.read-repo-info.outputs.build_image == 'true' | ||
- name: Build and Push | ||
uses: docker/build[email protected] | ||
if: steps.create-container-info.outputs.build == 'true' | ||
uses: docker/build_image[email protected] | ||
if: steps.read-repo-info.outputs.build_image == 'true' | ||
with: | ||
context: . | ||
file: Dockerfile | ||
tags: ${{ steps.create-container-info.outputs.tag_name }} | ||
cache-from: ${{ steps.create-container-info.outputs.image_name }}:cache-${{ steps.create-container-info.outputs.tag_name }} | ||
cache-to: ${{ steps.create-container-info.outputs.image_name }}:cache-${{ steps.create-container-info.outputs.tag_name }} | ||
tags: ${{ steps.read-repo-info.outputs.tag_name }} | ||
cache-from: ${{ steps.read-repo-info.outputs.image_name }}:cache-${{ steps.read-repo-info.outputs.tag_name }} | ||
cache-to: ${{ steps.read-repo-info.outputs.image_name }}:cache-${{ steps.read-repo-info.outputs.tag_name }} | ||
push: true | ||
outputs: | ||
tag_name: ${{ steps.create-container-info.outputs.tag_name }} | ||
image_name: ${{ steps.create-container-info.outputs.image_name }} | ||
container_name: ${{ steps.create-container-info.outputs.container_name }} | ||
tag_name: ${{ steps.read-repo-info.outputs.tag_name }} | ||
image_name: ${{ steps.read-repo-info.outputs.image_name }} | ||
container_name: ${{ steps.read-repo-info.outputs.container_name }} | ||
|
||
|
||
list-manifests: | ||
|