Skip to content

Commit 9b0150d

Browse files
committed
Create echo-tag.yml
1 parent 548a96a commit 9b0150d

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/echo-tag.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Echo Tag Name
2+
3+
on:
4+
push:
5+
branches:
6+
- auto-sync-sandbox # Trigger on push to auto-sync-sandbox
7+
tags:
8+
- '*' # Trigger on any tag push
9+
10+
release:
11+
types:
12+
- published # Trigger when a release is published
13+
branches:
14+
- auto-sync-sandbox # Only for releases from auto-sync-sandbox
15+
16+
workflow_dispatch: # Manual trigger
17+
branches:
18+
- auto-sync-sandbox # Only from auto-sync-sandbox branch
19+
20+
jobs:
21+
echo_tag:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Echo the Tag Name
26+
run: |
27+
# Check if the workflow was triggered by a tag push or a release
28+
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
29+
# Extract the tag name from the GITHUB_REF variable
30+
TAG_NAME="${GITHUB_REF##*/}"
31+
echo "The tag name is: $TAG_NAME"
32+
else
33+
echo "Not triggered by a tag, skipping..."
34+
fi

0 commit comments

Comments
 (0)