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

Does not restore mode bits of checked out files #18

Closed
Finii opened this issue Aug 24, 2022 · 2 comments · Fixed by #22
Closed

Does not restore mode bits of checked out files #18

Finii opened this issue Aug 24, 2022 · 2 comments · Fixed by #22

Comments

@Finii
Copy link

Finii commented Aug 24, 2022

I want to check out a json file and a script that processes it.

The mode of the script is 775 (rwxrwxr-x).
Using actions/checkout this is of course also restored.

Not with the action. The checked out script file is non-executable. Of course I can set it with chmod u+x and use it in the job, but maybe this action can restore the mode bits?

Thank you for this action, even as it is it saves me a lot of CI time 👍

@Bhacaz
Copy link
Owner

Bhacaz commented Feb 3, 2023

This action is base on the Rest API to simply download the files trough the Rest API, it doesn't keep the permission since the file is created by nodejs and the API doesn't seems to return this information...

I don't have a simple solution for this, maybe Git trees could help.

cc @mhung-lingraphica

@Finii
Copy link
Author

Finii commented Feb 4, 2023

Thanks for the reply.

Had a look at the Git tree API and it seems it provides the information:

image

I'm not sure it is worth the effort, though. In my use-case (I fetch some scripts I want to execute in the workflow) one can just chmod u+x *. But maybe worth mentioning that the mode is not restored on your main page.

Very nice action!

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 a pull request may close this issue.

2 participants