Update .gitea/workflows/tag-build.yaml
Build And Publish nightly / build-latest (push) Successful in 2m31s
Build And Publish nightly / build-latest (push) Successful in 2m31s
use env and step output instead of github_env, include validation to ensure the tag is being pulled and exposed correctly.
This commit is contained in:
@@ -21,13 +21,24 @@ jobs:
|
||||
|
||||
- name: Get release tag
|
||||
id: vars
|
||||
env:
|
||||
EVENT_NAME: ${{ forgejo.event_name }}
|
||||
REF_NAME: ${{ forgejo.ref_name }}
|
||||
INPUT_TAG: ${{ forgejo.event_inputs.tag }}
|
||||
run: |
|
||||
if [ "${{ forgejo.event_name }}" = "workflow_dispatch" ]; then
|
||||
TAG="${{ forgejo.event_inputs.tag }}"
|
||||
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
||||
TAG="$INPUT_TAG"
|
||||
else
|
||||
TAG="${{ forgejo.ref_name }}"
|
||||
TAG="$REF_NAME"
|
||||
fi
|
||||
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
|
||||
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "::error::Release tag is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
||||
echo "Building release tag: $TAG"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
@@ -50,4 +61,4 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: git.coopcloud.tech/toolshed/coop-cloud-webui:${{ env.RELEASE_TAG }}
|
||||
tags: git.coopcloud.tech/toolshed/coop-cloud-webui:${{ steps.vars.outputs.tag }}
|
||||
|
||||
Reference in New Issue
Block a user