Add tag workflow
This commit is contained in:
parent
daac3e4347
commit
5d18526774
|
@ -1,8 +1,6 @@
|
|||
name: Build website container
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
push: tags
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue