Skip to content

More sophisticated example for hashFiles function #32305

Open
@hamirmahal

Description

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles

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

I think it'd be beneficial if the hashFiles function showed slightly more sophisticated examples.

For example, what if I want to invalidate the cache any time .rs files at the top level of the src/ directory change?

I.e., I'd like to invalidate the cache if src/main.rs or src/constants.rs change, but not if anything in src/misc/ changes.

src/
├── constants.rs
├── main.rs
└── misc
    ├── main.rs

Additional information

No response

Metadata

Assignees

No one assigned

    Labels

    SME reviewedAn SME has reviewed this issue/PRactionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions