Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure image is published with HA version #76

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ jobs:
VERSION_OMADA=$(echo $VERSION_HA | sed -E 's/-ha[0-9]+$//')
DOCKER_IMAGE="${{ secrets.DOCKER_USER_NAME }}/home-assistant-omada"

echo "VERSION_HA=$VERSION_HA" >> $GITHUB_ENV
echo "VERSION_OMADA=$VERSION_OMADA" >> $GITHUB_ENV
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_ENV

echo "Target: ${{ matrix.target }}"
echo "Version HA: $VERSION_HA"
echo "Version Omada: $VERSION_OMADA"
echo "Docker Image: $DOCKER_IMAGE"

Expand All @@ -53,7 +55,7 @@ jobs:
- name: Check if Image Exists
id: check_image
run: |
if docker manifest inspect "${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:${{ env.VERSION_OMADA }}" > /dev/null 2>&1; then
if docker manifest inspect "${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:${{ env.VERSION_HA }}" > /dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
Expand All @@ -67,6 +69,6 @@ jobs:
build-args: INSTALL_VER=${{ env.VERSION_OMADA }}
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:${{ env.VERSION_OMADA }}"
tags: "${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:${{ env.VERSION_HA }}"
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:cache
cache-to: type=registry,ref=${{ env.DOCKER_IMAGE }}-${{ matrix.target }}:cache,mode=max