Skip to content

Update GHA script to build both containers from different files #132

Update GHA script to build both containers from different files

Update GHA script to build both containers from different files #132

name: Docker Image CI
on:
push:
branches: [ "main" ]
tags: ["v*"]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log into dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD}}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: seissol/training
- name: Build and push Docker image (x86-64)
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
labels: ${{ steps.meta.outputs.labels }}
#- name: Build and push Docker image (ARM)
# uses: docker/build-push-action@v4
# with:
# context: .
# file: Dockerfile_jupyterlab
# platforms: linux/arm64
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# labels: ${{ steps.meta.outputs.labels }}