Fix check if tag exists
This commit is contained in:
parent
9daa3d2a76
commit
d53171ea25
|
@ -15,14 +15,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
- name: Fetch tags
|
||||||
fetch-depth: 0
|
run: git fetch --tags origin
|
||||||
- name: Get latest git tag
|
|
||||||
id: tag
|
|
||||||
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: |
|
run: |
|
||||||
|
@ -32,7 +26,7 @@ jobs:
|
||||||
- name: Create tag if it doesn't exist
|
- name: Create tag if it doesn't exist
|
||||||
id: create
|
id: create
|
||||||
run: |
|
run: |
|
||||||
if git rev-parse "${{ steps.tag.outputs.tag }}"; then
|
if git rev-parse "${{ steps.mlflow.outputs.mlflow }}"; 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