Skip to content

Commit

Permalink
create-manfests [5]
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jan 19, 2025
1 parent b229317 commit f087e25
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,28 +128,28 @@ jobs:

- name: Create SHA manifest and push
run: |
for tag in $(echo "${{ needs.build-containers.outputs.tags }}" | tr ',' '\n'); do
base_tag=$(echo $tag | sed -E 's/.*:(.*)-(amd64|arm64)/\1/')
echo "Creating manifest for $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
# Delete architecture specific tags
for arch in amd64 arm64; do
curl -X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/packages/container/tamatebako/tebako-${{ matrix.container }}/versions/$base_tag-$arch"
done
for tag in $(echo "${{ needs.build-containers.outputs.tags }}" | tr ',' '\n'); do
base_tag=$(echo $tag | sed -E 's/.*:(.*)-(amd64|arm64)/\1/')
echo "Creating manifest for $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
# Delete architecture specific tags
for arch in amd64 arm64; do
curl -X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/packages/container/tamatebako/tebako-${{ matrix.container }}/versions/$base_tag-$arch"
done
done
curl -X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/packages/container/tamatebako/amd64-tebako-ubuntu-20.04/versions/0.7.1
curl -X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/packages/container/tamatebako/amd64-tebako-ubuntu-20.04/versions/0.7.1"
test-packaging-in-container:
name: Package ${{ matrix.gem }} in ${{ matrix.container }} ${{ matrix.architecture.platform }} with Ruby ${{ matrix.package_ruby_ver }}
Expand Down

0 comments on commit f087e25

Please sign in to comment.