Skip to content

Workflow Checker

Actions
Check if there are any other pending or in progress workflows for given runner lable
v2.0.1
Latest
Star (0)

workflow-check

build-test

A Github Action that checks if there are any other pending or in progress workflows for given runner label. In case the workflow is pending we don't get yet a runner id, so we can't check the label and the check returns true.

Usage

Inputs

  • token - Your Github API token. You can just use ${{ secrets.GITHUB_TOKEN }}
  • currentRunId - The run id of the current runner, required to exclude from results. Use ${{ github.run_id }}
  • runnerLabel - Label to be checked for other running workflows

Outputs

  • foundRunningJob - true if other running jobs have been found, false otherwise. In GitHub Actions the out put has to be compared to string. In bash booleans can be used. See Create a check run

Example Workflow

name: 'release-version'
on:
  pull_request:
  push:
    branches:
      - master
  workflow_dispatch:

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        
      - name: Build
        run: # Build scripts
        
      - name: Check CI
      	id: check-ci
      	uses: ronymeyer/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          currentRunId: ${{ github.run_id }}
          runnerLabel: "ubuntu-latest"
          
      - name: Release
      	if: ${{ steps.check-ci.outputs.foundRunningJob == 'true' }}
        run: # Release scripts

License

The scripts and documentation in this project are released under the MIT License

Workflow Checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check if there are any other pending or in progress workflows for given runner lable
v2.0.1
Latest

Workflow Checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.