File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments