v0.1.6-build003 #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release Docker image | |
on: | |
release: | |
types: [published] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
# perms for token | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4.1.7 | |
- name: container registry auth | |
uses: docker/login-action@v3.3.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: generate tags, label | |
id: meta | |
uses: docker/metadata-action@v5.5.1 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{ version }} | |
type=raw,value=latest,enable=${{ !github.event.release.prerelease }} | |
- name: image build and push | |
uses: docker/build-push-action@v6.7.0 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm/v7,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |