Skip to content

v0.5.3

v0.5.3 #32

Workflow file for this run

name: build-image
on:
push:
tags:
- '*'
- '**'
release:
types: [ published ]
workflow_dispatch:
env:
REGISTRY_FQDN: ghcr.io
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
SERVER_IMAGE_NAME: knaw-huc/annorepo-server
SERVER_IMAGE_FILE: k8s/annorepo-server/Dockerfile-multistage
UPDATER_IMAGE_NAME: knaw-huc/annorepo-updater
UPDATER_IMAGE_FILE: k8s/updater/Dockerfile
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY_FQDN }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker (server)
id: meta
uses: docker/metadata-action@v4.1.1
with:
images: ${{ env.REGISTRY_FQDN }}/${{ env.SERVER_IMAGE_NAME }}
- name: Build and push Docker image (server)
uses: docker/build-push-action@v3.2.0
with:
file: ${{ env.SERVER_IMAGE_FILE }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: true
- name: Extract metadata (tags, labels) for Docker (updater)
id: meta-updater
uses: docker/metadata-action@v4.1.1
with:
images: ${{ env.REGISTRY_FQDN }}/${{ env.UPDATER_IMAGE_NAME }}
- name: Build and push Docker image (updater)
uses: docker/build-push-action@v3.2.0
with:
file: ${{ env.UPDATER_IMAGE_FILE }}
labels: ${{ steps.meta-updater.outputs.labels }}
tags: ${{ steps.meta-updater.outputs.tags }}
push: true