myoung34/docker-github-actions-runner

My _work folder is getting too big with the accumulated build artifacts, how can I deal with this before it consumes all my disk space?

marco-carvalho opened this issue · 1 comments

What are the strategies to tackle this issue?

docker-compose.yml:

services:
  runner:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      ACCESS_TOKEN: ${ACCESS_TOKEN}
      RUNNER_GROUP: Default
      RUNNER_SCOPE: 'org'
      LABELS: linux,x64,gpu
      START_DOCKER_SERVICE: true
      EPHEMERAL: 1
    privileged: true
    security_opt:
      - label:disable
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: always
      resources:
        limits:
          memory: "4g"

This isnt something thats really in scope for this project, best I can hint is to maybe just delete files by age such as:

find /path/to/folder ! -type d -mtime +90 -exec rm -f {} +