Add tag workflow
Build website container / Build image (push) Successful in 12s Details
Create mlflow tag / Build image (push) Successful in 5s Details

This commit is contained in:
LordMathis 2024-01-31 11:54:43 +01:00
parent daac3e4347
commit 5d18526774
2 changed files with 29 additions and 3 deletions

View File

@ -1,8 +1,6 @@
name: Build website container
on:
push:
branches:
- main
push: tags
jobs:
build:

28
.gitea/workflows/tag.yaml Normal file
View File

@ -0,0 +1,28 @@
name: Create mlflow tag
on:
push:
branches:
- main
jobs:
build:
name: Build image
runs-on: ubuntu-latest
container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get latest git tag
id: tag
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: Get mlflow version
id: mlflow
run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT
- name: Create tag if it doesn't exist
run: |
if [[ $(git tag -l "${{ steps.tag.outputs.tag }}") ]]; then
echo "Tag already exists"
else
git tag ${{ steps.mlflow.outputs.mlflow }}
git push origin ${{ steps.mlflow.outputs.mlflow }}
fi