Skip to content

v0.0.0-test

v0.0.0-test #3

Workflow file for this run

name: release
on:
release:
types:
- published
workflow_dispatch:
inputs:
version:
description: Name of the version to release
required: false
default: "v0.0.0-test"
type: string
jobs:
build:
runs-on: ubuntu-24.04
env:
VERSION_NAME: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Login GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Image meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/lesomnus/bring
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Prepare
run: ./scripts/gen-version-file.sh
env:
BRING_VERSION: ${{ env.VERSION_NAME }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
build-args: |
VERSION_NAME=${{ env.VERSION_NAME }}
secrets: |
github_token=${{ secrets.GITHUB_TOKEN }}