Skip to content

Commit

Permalink
Update multiarch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
garanews authored Aug 1, 2024
1 parent 5eaee78 commit 8b8c58e
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/multiarch.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: create_dev_images
name: docker-compose-actions-workflow
on:
push:
branches:
- multiarch

tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -14,24 +15,15 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [linux/amd64, linux/arm64]
include:
- platform: linux/amd64
file: ./compose/local/django/Dockerfile
- dockerfile: ./compose/local/django/Dockerfile
image: ghcr.io/ldo-cert/orochi_django
name: ldo-cert/orochi_django
- platform: linux/arm64
file: ./compose/local/dask/Dockerfile
- dockerfile: ./compose/local/dask/Dockerfile
image: ghcr.io/ldo-cert/orochi_worker
name: ldo-cert/orochi_worker
- platform: linux/amd64
file: ./compose/local/nginx/Dockerfile
- dockerfile: ./compose/local/nginx/Dockerfile
image: ghcr.io/ldo-cert/orochi_nginx
name: ldo-cert/orochi_nginx
- platform: linux/amd64
- platform: linux/arm64
file: ./compose/local/nginx/Dockerfile
image: ghcr.io/ldo-cert/orochi_nginx
name: ldo-cert/orochi_nginx

steps:
- name: Checkout code
Expand All @@ -46,7 +38,6 @@ jobs:
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: image=moby/buildkit:master

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -55,18 +46,18 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}

- name: Build and push
- name: Build and push multi-platform image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.file }}
platforms: ${{ matrix.platform }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 8b8c58e

Please sign in to comment.