Skip to main content

GitHub Action: wait-commit-status

Wait for commit status

Introduction

Checks GitHub API for a given commit and look the commit status.

Usage

  name: github-action-wait-commit-status
on:
pull_request:
branches: [ 'main' ]
types: [opened, synchronize, reopened, closed, labeled, unlabeled]

jobs:
context:
runs-on: ubuntu-latest
steps:
- name: github-action-wait-commit-status
uses: cloudposse/github-action-wait-commit-status@main
with:
repository: ${{ github.repository }}
sha: ${{ github.sha }}
status: continuous-delivery/example-app
lookup: "success"
token: ${{ github.token }}
check-timeout: 120
check-retry-count: 5
check-retry-interval: 20

Inputs

NameDescriptionDefaultRequired
check-retry-countCheck retry count5false
check-retry-intervalCheck retry interval (in seconds)10false
expected_stateCommit status state wait for. Valid values 'success', 'error', 'failure', 'pending'successfalse
repositoryRepositoryN/Atrue
shaCommit SHAN/Atrue
statusCommit status nameN/Atrue
tokenGithub authentication token${{ github.token }}false