create git tag input to provide the exact datetime
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user