Skip to content

release

release #16

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
name:
description: 'Image name'
required: true
type: choice
options:
- kine
- zig
version:
description: 'Version'
required: true
type: string
push:
description: 'Push'
type: boolean
default: false
registry:
description: 'Registry'
type: string
default: 'ghcr.io'
repository:
description: 'Repository'
type: string
default: 'anza-labs/library'
permissions:
contents: write
packages: write
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- id: meta
uses: docker/metadata-action@v5
with:
images: |
name=${{ inputs.registry }}/${{ inputs.repository }}/${{ inputs.name }},enable=true
tags: |
type=semver,pattern={{version}},value=${{ inputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
- run: |
echo "variable \"${{ inputs.name }}\" { default = \"${{ inputs.version }}\" }" > ./vars.hcl
- id: buildx
uses: docker/setup-buildx-action@v3
- uses: docker/bake-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
push: ${{ inputs.push }}
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file }}
cwd://vars.hcl
targets: ${{ inputs.name }}