-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
31 lines (30 loc) · 787 Bytes
/
action.yml
File metadata and controls
31 lines (30 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Create and Save Tag'
description: 'Creates a new tag and saves it'
inputs:
complete:
description: 'Whether the pipline is completed'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: tag_name
id: tag_name
run: |
PREFIX=""
if [ "${{ inputs.complete }}" == "true" ]; then
PREFIX="release#"
fi
TAG_NAME=$PREFIX$(date +'%Y%m%dT%H%M%S')
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
shell: bash
- name: Create Tag
run: |
TAG_NAME=${{ steps.tag_name.outputs.tag_name }}
git tag $TAG_NAME
shell: bash
- name: Push Tag
run: |
TAG_NAME=${{ steps.tag_name.outputs.tag_name }}
git push origin $TAG_NAME
shell: bash