This commit is contained in:
parent
6af035476b
commit
d462f6c091
2 changed files with 35 additions and 2 deletions
33
.github/workflows/release.yml
vendored
Normal file
33
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Release into production
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to release'
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [dev, amd64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- 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
|
||||
- name: Final build
|
||||
run: |
|
||||
docker login gitea.ceperka.net -u "${{ secrets.HARBOR_HQ_REPO_USERNAME }}" -p "${{ secrets.HARBOR_HQ_REPO_PASSWORD }}"
|
||||
task squashed REPO=harbor.hq.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
|
||||
task push REPO=harbor.hq.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
|
||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -6,14 +6,14 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [moon, amd64]
|
||||
runs-on: [dev, amd64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Test build
|
||||
run: |
|
||||
# echo "${{ secrets.repo_password }}" | podman login -u $USERNAME --password-stdin $REPO
|
||||
docker login gitea.ceperka.net -u "${{ secrets.REPO_USERNAME }}" -p "${{ secrets.REPO_PASSWORD }}"
|
||||
task pipeline REPO=gitea.ceperka.net/rosti/runtime VERSION=pipeline
|
||||
task pipeline REPO=harbor.hq.rosti.cz/rosti/runtime/rosti/runtime VERSION=pipeline
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue