Create echo-tag.yml #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Echo Tag Name | |
| on: | |
| push: | |
| branches: | |
| - auto-sync-sandbox # Trigger on push to auto-sync-sandbox | |
| tags: | |
| - '*' # Trigger on any tag push | |
| release: | |
| types: | |
| - published # Trigger when a release is published | |
| branches: | |
| - auto-sync-sandbox # Only for releases from auto-sync-sandbox | |
| workflow_dispatch: # Manual trigger | |
| branches: | |
| - auto-sync-sandbox # Only from auto-sync-sandbox branch | |
| jobs: | |
| echo_tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Echo the Tag Name | |
| run: | | |
| # Check if the workflow was triggered by a tag push or a release | |
| if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | |
| # Extract the tag name from the GITHUB_REF variable | |
| TAG_NAME="${GITHUB_REF##*/}" | |
| echo "The tag name is: $TAG_NAME" | |
| else | |
| echo "Not triggered by a tag, skipping..." | |
| fi |