Skip to content

Rebuild CICD pipeline and automate dockerization #32

Rebuild CICD pipeline and automate dockerization

Rebuild CICD pipeline and automate dockerization #32

name: Docker Image CI
on:
push:
paths:
- 'Dockerfile'
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.SEISSOL_DOCKER_USERNAME }}
password: ${{ secrets.SEISSOL_DOCKER_PASSWORD}}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: seissol/tensorforge-ci
- name: Build and push Docker image
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 }}