Pushing new tag doesn't trigger Action

I have the following Action that’s supposed to be triggered whenever a new tag is pushed. This Action seemed to work fine until two months ago (where we released v2.6.1). Today, when we wanted to release v2.7.0, it seems that no matter what, we can’t trigger this Action. We have another Action to create the tag for us, but that’s beside the point. Even when we manually create a new tag and push it, it doesn’t trigger this Action. Your help is much appreciated. Thanks!

name: 🐍 Deploy to PyPI

      - '*'

    name: Publish 🐍 📦 to PyPI
    runs-on: ubuntu-latest

    - uses: actions/checkout@v2
        ref: release  # the production branch name (for proper version #)

    - name: Set up Python
      uses: actions/setup-python@v2
        python-version: 3.7

    - name: Set env variables
      run: |
        chmod +x .github/workflows/utils.sh
        source .github/workflows/utils.sh
        echo "TAG=$(get_most_recent_tag)" >> $GITHUB_ENV
        echo "VERSION=$(get_version $VERSION_FILE)" >> $GITHUB_ENV
    - name: Set env variables (for tag mismatch)
      run: |
        echo "Tag: $TAG, Version: $VERSION"
        if [ "${TAG//v}" = "$VERSION" ]; then
            echo "TAG_MISMATCH=false" >> $GITHUB_ENV
            echo "TAG_MISMATCH=true" >> $GITHUB_ENV
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
        echo ${{ github.event.ref }}
        echo "Tag/version mismatch: $TAG_MISMATCH"
    - name: Build distribution 📦
      run: python setup.py sdist bdist_wheel

    - name: Publish distribution 📦 to PyPI
      if: startsWith(github.event.ref, 'refs/tags') && contains(env.TAG_MISMATCH, 'false')
      uses: pypa/gh-action-pypi-publish@master
        user: __token__
        password: ${{ secrets.PYPI_TOKEN }}
        skip_existing: true

Here’s also a link to the Action: OpenPNM/publish-to-pypi.yml at a3f13ecaffd4dd3eaa992bd8f6720d9989e9e129 · PMEAL/OpenPNM · GitHub

@ma-sadeghi do you have managed this somehow?
I think I’m in the same situation. I have removed and created some new Workflows and not it will not trigger anymore.

Hi @boeckmt, yes I found the issue. It was because my last commit contained the keyword “ci skip”. As a result, any subsequent tag pushes (not regular commits) were being silenced. I’m not sure if this applies to your case though.

@ma-sadeghi thanks for the answer.
I don’t have something like “ci skip” but “ci: remove …”
Do you know any site where all such keywords are listed?

So now I got the Problem…
I had an old Tag for which I wanted to run a newer workflow, but looks like this is not possible.

It seems older commits/tags, only can use the workflows which are available on this commit!

List of keywords: GitHub Actions: Skip pull request and push workflows with [skip ci] - GitHub Changelog

1 Like