Skip to content

Publish stable image WolfStar #8

Publish stable image WolfStar

Publish stable image WolfStar #8

name: Publish stable image WolfStar
on:
workflow_dispatch:
inputs:
commit:
type: string
required: true
description: The SHA256 commit hash to publish
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
STABLE_TAG: ghcr.io/${{ github.repository }}:latest
jobs:
build:
name: Publish WolfStar stable image to container registry
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
labels: ${{ steps.meta.outputs.labels }}
context: .
platforms: linux/amd64,linux/arm64
outputs: type=image,name=${{ env.IMAGE_NAME }},push=true
tags: |
${{ env.STABLE_TAG }}