Skip to content

Commit

Permalink
IHS-86 Multiplatform containers (#87)
Browse files Browse the repository at this point in the history
* add multiplatform builds
refactoring github actions
  • Loading branch information
adedw authored Sep 28, 2024
1 parent df3438c commit 8b8cc76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 92 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/publish-container-webapi.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
name: Publish Tagger Hosted Service to GitHub container registry
name: Publish to GitHub container registry

on:
push:
branches: [ "master" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: image-hosting-storage-tagger

ORGANIZATION: baklanov-soft

jobs:
publish-container:
publish-containers:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64/v8
include:
- dockerfile: ./src/ImageHosting.Storage.WebApi/Dockerfile
image: ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/image-hosting-storage-webapi
- dockerfile: ./src/ImageHosting.Storage.Tagger/Dockerfile
image: ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/image-hosting-storage-tagger

permissions:
contents: read
Expand All @@ -31,6 +42,9 @@ jobs:
uses: sigstore/[email protected]
with:
cosign-release: 'v2.2.2'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand All @@ -54,7 +68,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
images: ${{ matrix.image }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand All @@ -63,7 +77,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./src/ImageHosting.Storage.Tagger/Dockerfile
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 8b8cc76

Please sign in to comment.