Skip to content

Commit

Permalink
Rework flow for manifest making
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Jan 17, 2025
1 parent 17297a8 commit 2152a24
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
latest=auto
suffix=-${{ matrix.arch }},onlatest=true
images: |
ghcr.io/matrix-org/matrix-hookshot:${{ matrix.arch }}
${{ env.DOCKER_NAMESPACE }}/matrix-hookshot
ghcr.io/matrix-org/matrix-hookshot
- name: Build and push Docker images
uses: docker/build-push-action@v6
Expand All @@ -84,9 +88,23 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
latest=auto
images: |
${{ env.DOCKER_NAMESPACE }}/matrix-hookshot
ghcr.io/matrix-org/matrix-hookshot
- name: Create and push manifest
run: |
docker manifest create ghcr.io/matrix-org/matrix-hookshot ghcr.io/matrix-org/matrix-hookshot:amd64 ghcr.io/matrix-org/matrix-hookshot:arm64
docker manifest push ghcr.io/matrix-org/matrix-hookshot
docker manifest create ${{ env.DOCKER_NAMESPACE }}/matrix-hookshot ghcr.io/matrix-org/matrix-hookshot:amd64 ghcr.io/matrix-org/matrix-hookshot:arm64
docker manifest push ${{ env.DOCKER_NAMESPACE }}/matrix-hookshot
for tag in ${{ steps.meta.outputs.tags }}; do
docker manifest create $tag $tag-amd64 $tag-arm64
docker manifest push $tag
done

0 comments on commit 2152a24

Please sign in to comment.