Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct default cache path #646

Closed
wants to merge 2 commits into from
Closed

Conversation

razonyang
Copy link

May fixes #645, but I'm not sure, since I didn't find any information about this cache path after searching docs, @deining would you mind checking if this PR is OK?

@razonyang razonyang requested a review from peaceiris as a code owner March 12, 2024 17:13
@deining
Copy link
Contributor

deining commented Mar 12, 2024

@deining would you mind checking if this PR is OK?

I suspect it makes a difference whether your workflow contains actions/go or not. If actions/go is part of the workflow, the cachedir is /home/runner/.cache/hugo_cache, without actions/go the cachedir is /tmp/hugo_cache_runner.
I created this PR to confirm. @razonyang: Can you please approve this PR and check the results of the workflow run? Thanks!

@razonyang
Copy link
Author

@deining You're right, I modified the PR a little more to cover those two use cases.

@Zer0xxxx
Copy link
Contributor

Hello @razonyang !
We've discussed yesterday on the Hugo's forum about this.
https://discourse.gohugo.io/t/how-to-cache-hugo-modules-in-a-github-action/50334

I'm reaching you because I've also pushed a PR on this repo, trying to fix this with an another approach.

What are your thoughts?
Warm regards.

@razonyang
Copy link
Author

razonyang commented Jun 19, 2024

@Zer0xxxx GitHub actions can be ran on Windows, there is no /tmp/ on Windows (although other approaches are same), I'd recommend leaving a separate section/paragraph about this approach, rather than deleting previous appraoches, but I'm not maintainer of this repo, you can wait for maintainer to check and reply.

@Zer0xxxx
Copy link
Contributor

Zer0xxxx commented Jun 19, 2024

@Zer0xxxx GitHub actions can be ran on Windows, there is no /tmp/ on Windows, so I'd recommend leaving a separate section/paragraph about this approach, rather than deleting previous appraoches, but I'm not maintainer of this repo, you can wait for maintainer to check and reply.

Oh, you're right. I'm dumb, haha!

I don't think this is necessarily a problem, though, since I've specified in the documentation snippets that the action runs on Ubuntu-22.04 (just above the env section).

Documenting absolutely every conceivable use seems to me to be rather complicated, and confusing.

Are there any use cases that I might miss where launching the action in a workflow rather on Windows than on Ubuntu is mandatory?

@razonyang
Copy link
Author

Are there any use cases that I might miss where launching the action in a workflow on Windows is better than on Ubuntu?

Maybe tests purpose, to make sure the theme works on all supported platforms (Linux, macOS and Windows).

@Zer0xxxx
Copy link
Contributor

Are there any use cases that I might miss where launching the action in a workflow on Windows is better than on Ubuntu?

Maybe tests purpose, to make sure the theme works on all supported platforms (Linux, macOS and Windows).

Hmm... Using a matrix, then?
Interesting, I might have a look. I think it is possible to define separate env variables depending on the matrix context.

@peaceiris
Copy link
Owner

👀

@Zer0xxxx
Copy link
Contributor

Zer0xxxx commented Jun 19, 2024

👀

Should I nail it too? 😉
(Sent you a Discord invite, DM whenever you want a PR from me. I might miss GitHub notifications.)

@razonyang
Copy link
Author

Lack of time to resolve conflicts, and env approach is not bad, closing this for now.

@razonyang razonyang closed this Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support: the default cachedir seems incorrect without actions/setup-go step
4 participants