runtime/.github/workflows/release.yml

37 lines
1.1 KiB
YAML
Raw Normal View History

2025-01-19 13:41:22 +00:00
name: Release into production
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
default: 'latest'
2025-01-20 13:10:30 +00:00
type: string
2025-01-19 13:41:22 +00:00
jobs:
build:
runs-on: [dev, amd64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
2025-01-20 13:11:22 +00:00
python-version: '3.12'
2025-01-19 13:41:22 +00:00
- name: Get git tag
id: get_tag
if: github.event_name == 'release'
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Set version from input
if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV
2025-01-19 22:01:34 +00:00
- name: Registry login
run: docker login gitea.ceperka.net -u "${{ secrets.HARBOR_REPO_USERNAME }}" -p "${{ secrets.HARBOR_REPO_PASSWORD }}"
2025-01-19 13:41:22 +00:00
- name: Final build
2025-01-19 22:01:34 +00:00
run: task squashed REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
2025-01-20 13:10:05 +00:00
- name: Push
2025-01-19 22:01:34 +00:00
run: task push REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
2025-01-19 13:41:22 +00:00