Skip to content

Commit

Permalink
fix: latest tag manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jan 20, 2025
1 parent 7d3079d commit a3ca124
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,22 @@ jobs:
- name: Create SHA manifest and push
run: |
for tag in $(echo "${{ needs.build-containers.outputs.tags }}" | tr ',' '\n'); do
if [[ $tag == *:latest ]]; then
base_tag="latest"
else
if [[ $tag != *:latest ]]; then
base_tag=$(echo $tag | sed -E 's/.*:(.*)-(amd64|arm64)/\1/')
echo "Processing $tag, using base tag $base_tag"
docker manifest create \
ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-amd64 \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-arm64
if [[ $base_tag == sha* ]]; then
docker manifest push ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag
docker manifest create \
ghcr.io/tamatebako/tebako-${{ matrix.container }}:latest \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-amd64 \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-arm64
docker manifest push ghcr.io/tamatebako/tebako-${{ matrix.container }}:latest
fi
fi
echo "Processing $tag, using base tag $base_tag"
docker manifest create \
ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-amd64 \
--amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-arm64
docker manifest push ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag
done
dispatch-dependent-repositories:
Expand Down

0 comments on commit a3ca124

Please sign in to comment.