github-tag-action
github-tag-action copied to clipboard
How the tag is pushed to repo?
I am working on a pipeline that includes two stages:
Stage 1: run build, if successful, generate a new tag. This works, I can see a new tag generated after commit code to master branch.
Stage 2: trigger a deployment only when a new tag generated. This doesn't work with below pipeline
name: CICD on version deploy
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy:
name: deploy-prod
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: run production deploy
run: |
echo "run production deploy"
But when I manually create and push a new tag, above pipeline will be triggered automatically (see here ) . Any hints for me?
reference:
pipeline for master branch: master.yml pipeline for tag/version generated: verison.yml