Bump to 3.1.16 #86
Workflow file for this run
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
# Automatically build container images for every push to master, | |
# and also every version tag in the form X.X.X[.*]. | |
# Built images are pushed to both docker.io and ghcr.io | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get git tag | |
id: git_info | |
if: startsWith(github.ref, 'refs/tags/') | |
run: echo "tag=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT | |
- name: Determine image tags | |
id: determine | |
env: | |
git_tag: ${{ steps.git_info.outputs.tag }} | |
run: | | |
repo="${GITHUB_REPOSITORY,,}" # to lower case | |
# if build triggered by tag, use tag name | |
tag="${git_tag:-latest}" | |
# if tag is a version number prefixed by 'v', remove the 'v' | |
if [[ "$tag" =~ ^v[0-9].* ]]; then | |
tag="${tag:1}" | |
fi | |
dock_image=$repo:$tag | |
echo $dock_image | |
echo "dock_image=$dock_image" >> $GITHUB_OUTPUT | |
echo "repo=$repo" >> $GITHUB_OUTPUT | |
- uses: docker/setup-qemu-action@v1 | |
- uses: docker/setup-buildx-action@v1 | |
id: buildx | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: | | |
${{ steps.determine.outputs.dock_image }} | |
ghcr.io/${{ steps.determine.outputs.dock_image }} | |
platforms: linux/amd64,linux/ppc64le,linux/arm64,linux/arm/v7 | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
PushContainerReadme: | |
runs-on: ubuntu-latest | |
name: Push README to Docker Hub | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v2 | |
- name: Docker Hub Description | |
uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
short-description: 'REST-API provider for ChRIS -> PACS' |