From dcafcf44bd9172b0f662d76a4fd76809b6d69653 Mon Sep 17 00:00:00 2001 From: Asilbek Date: Fri, 19 Aug 2022 14:20:05 +0500 Subject: [PATCH] added v1 --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dd3b55..4afb9cf 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -# action-cleanup \ No newline at end of file +# Cleanup Workspace - Github Action + +Simply removes all files from the root directory. + +This is useful to clean residue in workspaces +from previous self-hosted builds which can have a mix of root owned +files that are not able to be removed by the user running the action. + +It seems the checkout action is run as the host user, but files created by other +actions is run by root. The subsequent checkout is unable to remove the files +created from the previous run. Action Runners does not automatically clean up. + +This action can also be used in the end of workflow to clear all files +and free up diskspace in self-hosted runner. + +## Usage + +```yml +name: Build with Cleanup + +on: + push: + branches-ignore: + - master +jobs: + build: + runs-on: self-hosted + steps: + - uses: asilbek99/action-cleanup@v1 + - uses: actions/checkout@v3 + - run: echo Hello World +```