Skip to content

Label Docker image

Label Docker image #2

Workflow file for this run

name: Release
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "docker_image=ghcr.io/netwerk-digitaal-erfgoed/heritageflix" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build and push image to registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ steps.vars.outputs.docker_image }}:${{ steps.vars.outputs.sha_short }}
${{ steps.vars.outputs.docker_image }}:latest