Skip to content
user-check

GitHub Action

Workflow Manager

v1.0.3 Latest version

Workflow Manager

user-check

Workflow Manager

A helper action that can manage self hosted runner cleanup and workflow cancellations

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Workflow Manager

uses: xembly/[email protected]

Learn more about this action in xembly/workflow-manager

Choose a version

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.

  • The action MUST be the first step inside each job. If you place it after another step, it will not function correctly.

    ...
    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

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