The workflow create-release.yml is triggered by push a tag that started with letter v.
# create-release.yml
name: make a release
on:
push:
tags:
- "v*"
jobs:
check-version:
name: check version
runs-on: ubuntu-22.04
steps:
.....
It works fine when I create a tag locally and push it to the remote. But if a tag is created and pushed by a different workflow it won't triggered.
For example the bump-version.yml workflow below won't trigger make-release.yml
#bump-version.yml
name: Bump version
on: workflow_dispatch:
inputs:
version:
description: 'Semver type of new version (major / minor / patch)'
required: true
type: choice
options:
- patch
- minor
- major
jobs: bump-version:
runs-on: ubuntu-22.04
steps:
- name: checkout repo
uses: actions/checkout@v2.4.0
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.10.7
architecture: 'x64'
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
with:
poetry-version: 1.1.7
- run: poetry --version
- name: Setup Git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@teamname.com"
- name: bump version
run: |
poetry version ${{ github.event.inputs.version }}
git add pyproject.toml
git commit -m "bump up ${{ github.event.inputs.version }} version from workflow"
git push
- name: set up env var for tagging
run: echo VERSION_TAG="v""$(poetry version -s)">> $GITHUB_ENV
- name: Create tag
uses: rickstaa/action-create-tag@v1.3.7
with:
tag: "${{ env.VERSION_TAG }}"
- name: Push tag
run: git push origin "${{ env.VERSION_TAG }}" # WHY this push tag does not triggers the create-release.yml workflow? WHY?????