Skip to content

rm: cannot remove 'README.md': Permission denied #3

@ghost

Description

Hi!
I tried to do something similar to prevent self-hosted runners from filling up the filesystem and came across your action.

If I use the action I am getting a permission denied error on trying to remove the files. Apparently the docker run does not have sufficient access to the _work dir.
Can this be fixed somehow?

Action log from my workflow:

rm: cannot remove 'Dockerfile': Permission denied
rm: cannot remove 'README.md': Permission denied

Proposal:
Add a cleanup.sh to the image with the rm -rf command and call the cleanup.sh in the action.yml via run.post-entrypoint: '/cleanup.sh'. This ensures that the cleanup task is always run after the workflow is done, wether it fails or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions