Skip to content

docs(actions): invalid link caused by an internal link in reusable #25086

Closed
@muzimuzhi

Description

@muzimuzhi

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/triggering-a-workflow

What part(s) of the article would you like to see updated?

In https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters-to-target-specific-branches-for-pull-request-events, it reads

If you define both branches/branches-ignore and paths, the workflow will only run when both filters are satisfied.

In another section of the same page https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters-to-target-specific-branches-or-tags-for-push-events, it reads

If you define both branches/branches-ignore and paths, the workflow will only run when both filters are satisfied.

Here the two "paths"

Additional information

This is caused by the use of an internal link in reusable, see line 5 below

[`paths`](#onpushpull_requestpull_request_targetpathspaths-ignore)

If you define both `branches`/`branches-ignore` and [`paths`](#onpushpull_requestpull_request_targetpathspaths-ignore), the workflow will only run when both filters are satisfied.
The `branches` and `branches-ignore` keywords accept glob patterns that use characters like `*`, `**`, `+`, `?`, `!` and others to match more than one branch name. If a name contains any of these characters and you want a literal match, you need to escape each of these special characters with `\`. For more information about glob patterns, see the "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)."

When one reusable is used by different pages, in most cases internal links like [text](#target) will lead to invalid url in at least one of those rendered pages. The correct way is to tell the full path of the target page, like another link in line 7 in snippet above,

[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)

I'll provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions