{"id":18829796,"url":"https://github.com/eviden-actions/clean-self-hosted-runner","last_synced_at":"2025-03-30T02:44:21.762Z","repository":{"id":37785952,"uuid":"463575039","full_name":"eviden-actions/clean-self-hosted-runner","owner":"eviden-actions","description":"GitHub Actions to clean the working directory on self hosted runners","archived":false,"fork":false,"pushed_at":"2024-04-09T22:34:04.000Z","size":1999,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-10T01:18:53.977Z","etag":null,"topics":["actions","cleanup","eviden","github","github-actions","self-hosted-runner","workflows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eviden-actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-02-25T15:05:12.000Z","updated_at":"2024-08-18T23:40:38.066Z","dependencies_parsed_at":"2024-01-05T00:52:25.255Z","dependency_job_id":"5bc12bf5-6f9e-4bdf-af65-7b2fcb9c3912","html_url":"https://github.com/eviden-actions/clean-self-hosted-runner","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviden-actions%2Fclean-self-hosted-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviden-actions%2Fclean-self-hosted-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviden-actions%2Fclean-self-hosted-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviden-actions%2Fclean-self-hosted-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eviden-actions","download_url":"https://codeload.github.com/eviden-actions/clean-self-hosted-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246269911,"owners_count":20750319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","cleanup","eviden","github","github-actions","self-hosted-runner","workflows"],"created_at":"2024-11-08T01:46:25.599Z","updated_at":"2025-03-30T02:44:21.744Z","avatar_url":"https://github.com/eviden-actions.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clean-self-hosted-runner\n\nGitHub Actions to clean the working directory on self hosted runners\n\n[![Release](https://github.com/eviden-actions/clean-self-hosted-runner/actions/workflows/on_push.yml/badge.svg#main)](https://github.com/eviden-actions/clean-self-hosted-runner/actions/workflows/on_push.yml)\n\nPer the [official documentation](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners), self-hosted runners don't need to have a clean instance for every job execution.\nYour job might however need a clean working directory for every execution.\n\nThe goal of this action is to clean the working directory at the beginning or the end of each job.\n\n## Usage\n\n```yaml\nsteps:\n  - uses: eviden-actions/clean-self-hosted-runner@v1\n```\n\n### Options\n\nTo disable the cleanup job (e.g. for debugging purpose), set the [environment variable](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#env) `DISABLE_RUNNER_CLEANUP` to **true**\n\n### Example\n\nThis is an example of a simple NPM build workflow that will clean the working directory after each execution.\n\n```yaml\nname: My Workflow\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened]\n\njobs:\n  build:\n    runs-on: self-hosted\n\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v3\n      - run: npm ci\n      - run: npm run build\n      - uses: eviden-actions/clean-self-hosted-runner@v1\n        if: ${{ always() }} # Run even if previous steps in the job fail or are canceled\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviden-actions%2Fclean-self-hosted-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feviden-actions%2Fclean-self-hosted-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviden-actions%2Fclean-self-hosted-runner/lists"}