-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If docker changes a file / folder on a mounted volume the permissions at borked, probably to root root
. On a subsequent run the actions/checkout
will fail as it can't clean the repo. You will get errors on any file this action touches, I think for this action the implications are just on the .terraform/
folder?
Example of the errors:
Command failed: rm -rf "/actions-runner/_work/repo/repo/.terraform"
rm: cannot remove '/actions-runner/_work/repo/repo/.terraform/modules/my_module/wrappers/main.tf': Permission denied
Here is an example of a fix another author did once I raised the issue with them:
dflook/terraform-github-actions@v1.17.0...v1.17.1
You can work around this by:
- name: Get Actions user id
id: get_uid
run: |
actions_user_id=`id -u $USER`
echo $actions_user_id
echo ::set-output name=uid::$actions_user_id
- name: Correct Ownership in GITHUB_WORKSPACE directory
uses: peter-murray/reset-workspace-ownership-action@v1
with:
user_id: ${{ steps.get_uid.outputs.uid }}
- uses: actions/checkout@v2
but this is a faff and should be handled by the action natively
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request