Skip to content

Support non-ephemeral runners #30

@toast-gear

Description

@toast-gear

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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions