actions / actions/runner

Path filters not respected for tag pushes in workflow triggers #3932

Open
#3,933 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Bug Report

Description

Path filters in workflow triggers are not being respected when tags are pushed, causing workflows to run even when the specified paths haven't been modified.

Expected Behavior

A workflow with path filters should only run when the specified files are modified, regardless of whether it's a branch push or tag push.

Actual Behavior

Workflows with path filters run on tag pushes even when none of the specified paths have been modified.

Reproduction Steps
  1. Create a workflow with path filters:
on:
  push:
    paths:
      - "specific-file.txt"
      - ".github/workflows/workflow.yaml"
  1. Make a commit that doesn't modify any of the specified paths
  2. Create and push a tag for that commit
  3. Observe that the workflow runs despite no matching files being changed
Evidence
  • Workflow configuration shows path filters
  • Commit only modified unrelated files (e.g., pkg/config/config_utils.go)
  • GitHub API shows workflow triggered by push event with tag as head_branch
  • Expected: Workflow should not run
  • Actual: Workflow runs
Workaround

Adding tags-ignore: "**" to the push trigger prevents the issue:

on:
  push:
    tags-ignore:
      - "**"
    paths:
      - "specific-file.txt"
Environment
  • GitHub Actions (hosted runners)
  • All workflow trigger types affected
  • Reproducible across different repositories
Impact

This causes unnecessary workflow runs, wasting CI/CD resources and potentially causing confusion about when workflows should execute.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the workflow YAML and tag-push steps described in the report, then trace how tag push events apply path filters. Done means a tag push runs the workflow only when a configured path changed, while unrelated changes do not trigger it; add or update coverage for this behavior if the repository's test setup supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.