Переглянути джерело

ci: build alpine docker image

Signed-off-by: rare-magma <rare-magma@posteo.eu>
rare-magma 2 роки тому
батько
коміт
348494dab4
1 змінених файлів з 10 додано та 1 видалено
  1. 10 1
      .github/workflows/docker-publish.yml

+ 10 - 1
.github/workflows/docker-publish.yml

@@ -26,6 +26,14 @@ env:
 jobs:
   build:
     runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - dockerfile: ./Dockerfile
+            image: ghcr.io/${{ github.repository }}
+          - dockerfile: ./Dockerfile.alpine
+            image: ghcr.io/${{ github.repository }}-alpine
     permissions:
       contents: read
       packages: write
@@ -59,7 +67,7 @@ jobs:
         id: meta
         uses: docker/metadata-action@v5
         with:
-          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+          images: ${{ matrix.image }}
           tags: |
             type=ref,event=branch
             type=ref,event=pr
@@ -75,6 +83,7 @@ jobs:
         uses: docker/build-push-action@v5
         with:
           context: .
+          file: ${{ matrix.dockerfile }}
           platforms: linux/amd64,linux/arm64
           push: ${{ github.event_name != 'pull_request' }}
           tags: ${{ steps.meta.outputs.tags }}