Skip to content

Publications 9.4.1

Publications 9.4.1 #31

name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
if: github.repository == 'pekrau/publications'
name: Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Github Container Repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/pekrau/publications
tags: |
type=sha,format=long
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and publish backend
uses: docker/build-push-action@v3
with:
file: docker/Dockerfile-prod
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}