Build chaste/base #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build chaste/base | |
on: | |
push: | |
branches: [ "master" ] | |
tags: "v*" | |
pull_request: | |
branches: [ "master" ] | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# https://github.com/actions/checkout/ | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
# https://github.com/docker/metadata-action | |
with: | |
images: | | |
chaste/base | |
flavor: latest=true | |
tags: | | |
type=schedule,pattern={{date 'YYYYMMDD'}} | |
# type=ref,event=branch | |
# type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
# Update the following line to match the base ubuntu image | |
type=raw,value=oracular | |
type=sha | |
labels: | | |
org.opencontainers.image.title=Chaste Base Image | |
org.opencontainers.image.description=Docker Base Image for Chaste: Cancer, Heart and Soft Tissue Environment | |
org.opencontainers.image.url=https://hub.docker.com/repository/docker/chaste/base/general | |
org.opencontainers.image.source=https://github.com/Chaste/chaste-docker | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-qemu-action | |
with: | |
platforms: 'amd64,arm64' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
# https://github.com/docker/login-action | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push the Docker image | |
uses: docker/build-push-action@v5 | |
# https://github.com/docker/build-push-action | |
with: | |
context: . | |
platforms: 'amd64,arm64' | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
target: base |