Skip to content

v0.5.4

v0.5.4 #34

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/[email protected]
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/[email protected]
with:
images: ${{ env.REGISTRY_FQDN }}/${{ env.SERVER_IMAGE_NAME }}
- name: Build and push Docker image (server)
uses: docker/[email protected]
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/[email protected]
with:
images: ${{ env.REGISTRY_FQDN }}/${{ env.UPDATER_IMAGE_NAME }}
- name: Build and push Docker image (updater)
uses: docker/[email protected]
with:
file: ${{ env.UPDATER_IMAGE_FILE }}
labels: ${{ steps.meta-updater.outputs.labels }}
tags: ${{ steps.meta-updater.outputs.tags }}
push: true