Skip to content

chore(release): prepare beta release #215

chore(release): prepare beta release

chore(release): prepare beta release #215

Workflow file for this run

name: Publish
on:
push:
branches:
- main
tags:
- 'v*-alpha.*'
- 'v*-beta.*'
- 'v*-rc.*'
workflow_dispatch:
inputs:
version:
description: Developer image tag for manual hardware testing
required: true
default: dev
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/navet
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack
run: corepack enable
- name: Activate pinned pnpm
run: corepack install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Resolve Docker tags
id: tags
run: |
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
{
echo "value<<EOF"
echo "$IMAGE:$VERSION"
echo "$IMAGE:sha-${GITHUB_SHA::7}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
elif [ "${GITHUB_REF_TYPE}" = "tag" ]; then
{
echo "value<<EOF"
echo "$IMAGE:${GITHUB_REF_NAME}"
echo "$IMAGE:beta"
echo "$IMAGE:latest"
echo "$IMAGE:sha-${GITHUB_SHA::7}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
{
echo "value<<EOF"
echo "$IMAGE:dev"
echo "$IMAGE:sha-${GITHUB_SHA::7}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
fi
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.value }}