Skip to content

chore(release): v0.4.1 #14

chore(release): v0.4.1

chore(release): v0.4.1 #14

Workflow file for this run

name: Release Docker image
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: 'Tag to build (e.g. v0.1.0). Required for manual runs.'
required: true
type: string
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Resolve ref
id: ref
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
ref="${{ github.event.inputs.tag }}"
else
ref="${{ github.ref_name }}"
fi
echo "ref=$ref" >> "$GITHUB_OUTPUT"
echo "version=${ref#v}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/etherfunlab/eros-engine:${{ steps.ref.outputs.version }}
ghcr.io/etherfunlab/eros-engine:latest
cache-from: type=gha
cache-to: type=gha,mode=max
labels: |
org.opencontainers.image.source=https://github.com/etherfunlab/eros-engine
org.opencontainers.image.version=${{ steps.ref.outputs.version }}
org.opencontainers.image.licenses=AGPL-3.0-only