Skip to content

Commit

Permalink
Update builder.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
UplandJacob2 authored Nov 14, 2024
1 parent 880c2ab commit 4d31f23
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,28 +164,30 @@ jobs:
uses: docker/[email protected]

- name: Build and push Docker images
if: steps.check.outputs.build_arch == 'true'
if: ${{ steps.check.outputs.build_arch == 'true' && env.VERSION != env.LATEST_VERSION }}
run: |
if [[ env.VERSION != env.LATEST_VERSION ]]; then
echo "PUSHING BUILD"
docker buildx build --platform linux/${{ env.PLATFORM }} \
--build-arg BUILD_FROM=${{ env.BUILD_FROM }} \
--build-arg REPO_URL=https://github.com/${{ env.REPO_NAME_LC }} \
--build-arg VERSION=${{ env.VERSION }} \
--build-arg PLATFORM=${{ env.PLATFORM }} \
--push \
-t ghcr.io/${{ env.REPO_NAME_LC }}-${{ matrix.addon }}-${{ matrix.arch }}:${{ env.VERSION }} \
./${{ matrix.addon }}
else
echo "NOT PUSHING BUILD"
docker buildx build --platform linux/${{ env.PLATFORM }} \
--build-arg BUILD_FROM=${{ env.BUILD_FROM }} \
--build-arg REPO_URL=https://github.com/${{ env.REPO_NAME_LC }} \
--build-arg VERSION=${{ env.VERSION }} \
--build-arg PLATFORM=${{ env.PLATFORM }} \
-t ghcr.io/${{ env.REPO_NAME_LC }}-${{ matrix.addon }}-${{ matrix.arch }}:${{ env.VERSION }} \
./${{ matrix.addon }}
fi
echo "PUSHING BUILD"
docker buildx build --platform linux/${{ env.PLATFORM }} \
--build-arg BUILD_FROM=${{ env.BUILD_FROM }} \
--build-arg REPO_URL=https://github.com/${{ env.REPO_NAME_LC }} \
--build-arg VERSION=${{ env.VERSION }} \
--build-arg PLATFORM=${{ env.PLATFORM }} \
--push \
-t ghcr.io/${{ env.REPO_NAME_LC }}-${{ matrix.addon }}-${{ matrix.arch }}:${{ env.VERSION }} \
./${{ matrix.addon }}
- name: Build Docker images
if: ${{ steps.check.outputs.build_arch == 'true' && env.VERSION == env.LATEST_VERSION }}
run: |
echo "NOT PUSHING BUILD"
docker buildx build --platform linux/${{ env.PLATFORM }} \
--build-arg BUILD_FROM=${{ env.BUILD_FROM }} \
--build-arg REPO_URL=https://github.com/${{ env.REPO_NAME_LC }} \
--build-arg VERSION=${{ env.VERSION }} \
--build-arg PLATFORM=${{ env.PLATFORM }} \
-t ghcr.io/${{ env.REPO_NAME_LC }}-${{ matrix.addon }}-${{ matrix.arch }}:${{ env.VERSION }} \
./${{ matrix.addon }}

0 comments on commit 4d31f23

Please sign in to comment.