From 734c67dfa8e4fc8561765ed488ac154125d7c37c Mon Sep 17 00:00:00 2001 From: Zee Vieira Date: Tue, 11 Nov 2025 13:52:19 +0100 Subject: [PATCH] create git tag input to provide the exact datetime --- .gitea/workflows/docker-tag-release.yaml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/docker-tag-release.yaml b/.gitea/workflows/docker-tag-release.yaml index 49bd305..e8fb06c 100644 --- a/.gitea/workflows/docker-tag-release.yaml +++ b/.gitea/workflows/docker-tag-release.yaml @@ -4,28 +4,32 @@ on: workflow_call: inputs: environment: - description: 'Environment to release in' + description: "Environment to release in" type: string required: true image: - description: 'Where to store the built image' + description: "Where to store the built image" required: true type: string + git_tag: + description: "Git tag to use for the release" + required: false + type: string user: - description: 'Git user for checkout' - default: 'automation' + description: "Git user for checkout" + default: "automation" required: false type: string token: - description: 'Git token for checkout' + description: "Git token for checkout" required: true type: string outputs: tag: - description: 'Release image tag' + description: "Release image tag" value: ${{ steps.release.outputs.tag }} tag_name: - description: 'Release image tag name' + description: "Release image tag name" value: ${{ steps.release.outputs.tag_name }} jobs: release: @@ -34,7 +38,7 @@ jobs: - name: Create metadata id: meta run: | - echo tag_name=${{ inputs.environment }}-$(date +%F-%H%M%S)-${{ gitea.sha }} > $GITHUB_OUTPUT + echo tag_name=${{ inputs.environment }}-${{ inputs.git_tag }}-${{ gitea.sha }} > $GITHUB_OUTPUT - name: Registry login uses: docker/login-action@v3 with: @@ -56,4 +60,4 @@ jobs: echo tag=$TAG >> $GITHUB_OUTPUT outputs: tag: ${{ steps.push.outputs.tag }} - tag_name: ${{ steps.meta.outputs.tag_name }} \ No newline at end of file + tag_name: ${{ steps.meta.outputs.tag_name }}