Skip to content

A Github Action that checks if there are other running or pending workflow statuses

License

Notifications You must be signed in to change notification settings

ronymeyer/workflow-status

 
 

Repository files navigation

workflow-status

build-test

A Github Action that checks another workflow's latest status

Usage

Inputs

  • token - Your Github API token. You can just use ${{ secrets.GITHUB_TOKEN }}
  • workflow - The filename of the workflow to check
  • branch - Branch name to check. Defaults to main
  • repo - (Optional) Repository to check
  • event - (Optional) Event to validate, see Events that trigger workflows to get the full list

Outputs

  • status & conclusion - Result of Github API. For a list of the possible status and conclusion options, see Create a check run
  • Please note that conclusion may be null when the workflow is currently running

Example Workflow

name: 'release-version'
on:
  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 }}
          workflow: ci.yml
          event: push
          branch: development
          
      - name: Release
      	if: ${{ steps.check-ci.outputs.conclusion == 'success' }}
        run: # Release scripts

License

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

About

A Github Action that checks if there are other running or pending workflow statuses

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 70.0%
  • TypeScript 30.0%