Skip to content

Add example with Perl #7

Add example with Perl

Add example with Perl #7

Workflow file for this run

name: build
on:
push:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
# A local registry helps us reuse the built image between steps
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
# QEMU is used for non-x86_64 builds
- uses: docker/setup-qemu-action@v2
# buildx adds additional features to docker build
- uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
# cache slightly improves rebuild time
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
id: dockerhub_login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push (microminc-builder)
uses: docker/build-push-action@v3
id: docker_build
with:
context: .
file: ./Dockerfile
tags: |
localhost:5000/fnndsc/microminc-builder:latest
docker.io/fnndsc/microminc-builder:latest
docker.io/fnndsc/microminc-builder:2.1.1
ghcr.io/fnndsc/microminc-builder:latest
ghcr.io/fnndsc/microminc-builder:2.1.1
platforms: linux/amd64,linux/arm64,linux/ppc64le
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v3
continue-on-error: true # it is not crucial that this works
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
short-description: Minimize images of CIVET + MINC tools
readme-filepath: ./README.md