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

Support non-ephemeral runners #30

Open
toast-gear opened this issue Oct 11, 2021 · 0 comments
Open

Support non-ephemeral runners #30

toast-gear opened this issue Oct 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@toast-gear
Copy link

toast-gear commented Oct 11, 2021

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

@owenrumney owenrumney added the enhancement New feature or request label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants