Skip to content

release

release #13

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
name:
description: 'Name of the image to release'
required: true
type: choice
options:
- kine
- zig
version:
description: 'Version to release'
required: true
type: string
permissions:
contents: write
packages: write
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- id: meta
uses: docker/metadata-action@v5
with:
images: |
name=ghcr.io/anza-labs/library/${{ inputs.name }},enable=true
tags: |
type=semver,pattern={{version}},value=${{ inputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
- run: |
echo "$(cat ${{ steps.meta.outputs.bake-file }})" >> $GITHUB_STEP_SUMMARY
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: false
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file }}
cwd://vars.hcl
targets: ${{ inputs.name }}