https://github.com/xembly/workflow-manager
A helper action that can manage self-hosted runner cleanup and workflow cancellations.
https://github.com/xembly/workflow-manager
actions github-actions workflow
Last synced: 5 months ago
JSON representation
A helper action that can manage self-hosted runner cleanup and workflow cancellations.
- Host: GitHub
- URL: https://github.com/xembly/workflow-manager
- Owner: xembly
- License: mit
- Created: 2021-03-18T14:32:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T04:34:06.000Z (over 1 year ago)
- Last Synced: 2025-06-30T14:48:39.402Z (12 months ago)
- Topics: actions, github-actions, workflow
- Language: TypeScript
- Homepage:
- Size: 1.53 MB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Workflow Manager : A GitHub Action
A helper action that can manage self hosted runner cleanup and workflow cancellations.
- `Clean Workspace`: Removes any old workspace files and directories while leaving runner cache intact.
- `Cancel Workflows`: Cancels any previous runs that are not `completed` for the current workflow.
## Usage
### Prerequisites
- A workflow `.yaml|.yml` file in your repositories `.github/workflows` directory. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
- The action _**MUST**_ be the first step inside each job. If you place it after another step, it will not function correctly.
```yaml
...
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: xembly/workflow-manager@v1
# other steps
deploy:
runs-on: ubuntu-latest
steps:
- uses: xembly/workflow-manager@v1
# other steps
...
```
### Inputs
- `token`: Your GitHub API token. Recommended to use `${{ secrets.GITHUB_TOKEN }}` _**[required only if cancel option specified]**_
- `run`: A comma separated list of helper functions to run. Valid options are: `clean`, `cancel`. Default: `clean`
- `verbose`: Outputs addition logs during execution. Default: `false`
### Outputs
- `REF_NAME`: The branch or tag name if ref is from a tag push. (this is set as an environment variable)
- `REF_TYPE`: Denotes if the REF is a 'tag' or 'branch'. (this is set as an environment variable)
### Example Usage
```yaml
uses: xembly/workflow-manager@v1
with:
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Github Actions, you do not need to create your own token
run: clean, cancel # Optional, Default: clean
verbose: true # Optional, Default: false
```