Update tag exists check
This commit is contained in:
parent
a4ed47c176
commit
9daa3d2a76
|
@ -19,14 +19,20 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get latest git tag
|
- name: Get latest git tag
|
||||||
id: tag
|
id: tag
|
||||||
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
tag=$(git describe --tags --abbrev=0)
|
||||||
|
echo $tag
|
||||||
|
echo "tag=$tag" >> $GITHUB_OUTPUT
|
||||||
- name: Get mlflow version
|
- name: Get mlflow version
|
||||||
id: mlflow
|
id: mlflow
|
||||||
run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f2)
|
||||||
|
echo $mlflow
|
||||||
|
echo "mlflow=$mlflow" >> $GITHUB_OUTPUT
|
||||||
- name: Create tag if it doesn't exist
|
- name: Create tag if it doesn't exist
|
||||||
id: create
|
id: create
|
||||||
run: |
|
run: |
|
||||||
if git tag -l "${{ steps.tag.outputs.tag }}"; then
|
if git rev-parse "${{ steps.tag.outputs.tag }}"; then
|
||||||
echo "Tag already exists"
|
echo "Tag already exists"
|
||||||
echo "created=false" >> $GITHUB_OUTPUT
|
echo "created=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue