This GitHub action will clean up the runner workspace via a post command to avoid dirty filesystem issues on the self-hosted runners.
Open GitHub issues:
This GitHub action must be defined before the actions/checkout
and the actions/cache
to clean up the workspace.
name: Pull Request Pipeline
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: self-hosted
steps:
- uses: visable-dev/gh-action-cleanup-workspace@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
...