actions / checkout

Action for checking out a repo

Home Page:https://github.com/features/actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: File was unable to be removed Error: EACCES: permission denied, rmdir '/opt/actions-runner/_work/...

mihalt opened this issue · comments

When I run checout second+ times I have error like this on the title on my ubuntu self-hosted runner. A config is very simple like

on:
  push:
    branches: [ "production", "developing" ]
  pull_request:
    branches: [ "production", "developing" ]
  workflow_dispatch:

env:
  IMAGE_NAME: ${{ github.repository }}

jobs:
  testing:
    runs-on: self-hosted

    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v4

      - uses: hoverkraft-tech/compose-action@v1.5.1
        with:
          up-flags: "--build"
      - name: testing
        run: "docker compose exec app pytest"
...

This command can help, but just once. After on the next running of job I see the same errors:

sudo chmod -R u+w /opt/actions-runner/_work/
sudo chown -R <username>:<group> /opt/actions-runner/_work/