Skip to content

Release

Release #39

Workflow file for this run

name: Release
env:
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
on:
workflow_run:
workflows: [ CI ]
branches: [ main ]
types:
- completed
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
driver: docker-container
- name: Convert repo-name to lowercase
run: |
echo "REPOSITORY=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Log into registry GHCR
if: success()
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to ghcr.io
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: ${{ env.platforms }}
push: true
tags: ghcr.io/${{ env.REPOSITORY }}:latest
cache-from: type=gha
cache-to: type=gha