docs icon indicating copy to clipboard operation
docs copied to clipboard

More sophisticated example for `hashFiles` function

Open hamirmahal opened this issue 1 year ago • 9 comments
trafficstars

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

hamirmahal avatar Mar 30 '24 07:03 hamirmahal

@hamirmahal Thank you for raising this issue! I'll get this triaged for review :sparkles: Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

nguyenalex836 avatar Apr 01 '24 15:04 nguyenalex836

@nguyenalex836 You're welcome!

hamirmahal avatar Apr 01 '24 21:04 hamirmahal

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:

github-actions[bot] avatar Apr 02 '24 21:04 github-actions[bot]

@hamirmahal Thank you for your patience while our team reviewed! ✨

Our engineering believes adding these additional, more complex examples makes sense. Some experimentation may be necessary to figure out what patterns actually work and what scenarios GitHub supports 💛

Aside from the scenario you listed initially, do you have a list of more sophisticated scenarios you were looking to add?

nguyenalex836 avatar Apr 11 '24 21:04 nguyenalex836

@nguyenalex836 You're welcome!

hamirmahal avatar Apr 11 '24 22:04 hamirmahal

I can't think of any more sophisticated scenarios at the moment, but I'll post them if I think of any.

hamirmahal avatar Apr 11 '24 22:04 hamirmahal

@hamirmahal Sounds like a plan ✨ For now, I'm adding our help wanted label to this issue. You, or anyone else, are welcome to submit a PR with the example regarding hashFiles function for review 💛

nguyenalex836 avatar Apr 11 '24 22:04 nguyenalex836

@nguyenalex836 I don't think I know enough about the hashFiles function to contribute docs for it; it's why I opened this issue.

Is anyone from the team able to contribute them?

hamirmahal avatar Jun 18 '24 18:06 hamirmahal

@hamirmahal Apologies! Our overzealous bot closed this issue - I've just reopened so that a community member can pick this issue up 💛

nguyenalex836 avatar Jun 18 '24 18:06 nguyenalex836