Skip to content

1.0.1

1.0.1 #2

name: Publish container
on:
release:
types: [published]
jobs:
publish-ghcr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gather metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: ghcr.io/zetifi/docker-irestarter
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64/v8,linux/amd64
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.github_token }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: .
platforms: linux/arm64/v8,linux/amd64
labels: ${{ steps.metadata.outputs.labels }}
tags: ${{ steps.metadata.outputs.tags }}, ghcr.io/zetifi/docker-irestarter:latest
cache-from: type=gha
cache-to: type=gha,mode=max