diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index f090fdc..af03d0b 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -32,7 +32,12 @@ jobs: id: get_tags run: | latest_tag=$(curl -s https://framagit.org/api/v4/projects/74246/repository/tags | grep -o -E 'v[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + if [ -z "$latest_tag" ]; then + echo "No valid tag found. Exiting." + exit 1 + fi echo "Latest version is $latest_tag" + echo "latest_tag=$latest_tag" >> $GITHUB_ENV - name: Build and Push with Latest Tag uses: docker/build-push-action@v4 @@ -42,4 +47,4 @@ jobs: file: ./aktivisda/server/Dockerfile platforms: linux/amd64 push: true - tags: fung.uy/mirrors/aktivisda:${{ steps.get_tags.outputs.latest_tag }} + tags: fung.uy/mirrors/aktivisda:${{ env.latest_tag }} \ No newline at end of file