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

Change repo dir owner to action user so files can be deleted #155

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

nmdefries
Copy link
Collaborator

@nmdefries nmdefries commented Aug 17, 2021

Description

Some (but oddly not all) data files from a previous run of this action are created with root as the owner. Because the action runs as a non-root user, such files are not able to be deleted which is necessary for the actions/checkout@v2 step to install the newest version of the repo.

This seems to be a bug in the actions/checkout@v2 command. Summary of issue and suggested fixes.

This problem seems to happen rarely (this is the first occurrence). It is unclear why it started happening -- the checkout action hasn't released a new version recently, and our workflow and code haven't changed.

This fix changes the owner of the directory from root to the actions working user so that the user is allowed to delete it (requires passwordless sudo or password stored in GitHub Actions secrets).

Changes

  • Explicitly change owner of directory-to-be-deleted to workflow user.

Some data files from a previous run of this action are created with root
as the owner. Because the action runs as a non-root user, such files are
[not able to be deleted](https://github.com/cmu-delphi/forecast-eval/runs/3351290227?check_suite_focus=true)
which is needed for the actions/checkout@v2 step
to install the newest version of the repo.

This seems to be a bug in the actions/checkout@v2 command, perhaps
specific to self-hosted workflows. [Summary of
issue](actions/runner#691) and [suggested
fixes[(actions/checkout#211).
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nmdefries nmdefries merged commit 5178819 into dev Aug 18, 2021
@nmdefries nmdefries deleted the fix-permissions-on-action-setup branch September 15, 2021 15:08
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.

2 participants