Skip to content

1.0.0

1.0.0 #7

Workflow file for this run

name: Release
on:
release:
types:
- published
env:
DOCKER_IMAGE: toshy/mkvexport
jobs:
release:
name: Build docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ env.DOCKER_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build base image
uses: docker/build-push-action@v6
with:
context: .
load: true
target: prod
tags: ${{ env.DOCKER_IMAGE }}:prod
- name: Test base image
run: |
docker run --rm ${{ env.DOCKER_IMAGE }}:prod --help
- name: Build and push production image
uses: docker/build-push-action@v6
with:
context: .
push: true
target: prod
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}