require-conditional-status-checks

module
v0.0.0-...-070363a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: Apache-2.0

README

GitHub Action: Require Conditional Status Checks

Example Usage

---
name: 'Meta Workflow: Require Conditional Status Checks'

on:
  pull_request:
    branches:
    - main

jobs:
  meta:
    runs-on:
    - ubuntu-20.04

    steps:
    - name: Ensure All Conditional Checks Have Passed
      uses: blend/require-conditional-status-checks@2022.02.04
      with:
        interval: 20s
        checks-yaml: |
          - job: unit-test-go-core
            paths:
            - cmd/**
            - pkg/**
          - job: lint-go
          - job: protobuf-check-generated
            paths:
            - proto/**
            - pkg/protogen/**
          - job: lint-protobuf
            paths:
            - proto/**

Alternatively, the checks-yaml can be checked into a file in your repository

# ...
    steps:
    - name: Ensure All Conditional Checks Have Passed
      uses: blend/require-conditional-status-checks@2022.02.04
      with:
        interval: 20s
        checks-filename: .github/monorepo/required-checks.yml
# ...

See It In Action

From a recent workflow run on public GitHub:

Example Workflow Public

From a recent workflow on GitHub Enterprise:

Example Workflow GHE

Limitations

  • The GitHub CompareCommits() API can return at most 300 files when comparing two commits. This makes it impossible to determine the full list of impacted files for PRs with 300 or more files. The list of files is critical for blend/require-conditional-status-checks to determine which checks to enforce.

Development

For more information on how this GitHub Action is developed, see the DEVELOPMENT document.

Directories

Path Synopsis
cmd
pkg
actions
Package actions is a set of utilities to help write GitHub Actions code, in particular for parsing inputs and reading the `${{ github }}` context outside of a workflow.
Package actions is a set of utilities to help write GitHub Actions code, in particular for parsing inputs and reading the `${{ github }}` context outside of a workflow.
github
Package github is a focused wrapper around `github.com/google/go-github` with methods needed for `blend/require-conditional-status-checks`.
Package github is a focused wrapper around `github.com/google/go-github` with methods needed for `blend/require-conditional-status-checks`.
gitignore
Package gitignore provides helpers for parsing `.gitignore` files.
Package gitignore provides helpers for parsing `.gitignore` files.
requireconditional
Package requireconditional provides the core implementation for the `blend/require-conditional-status-checks` GitHub Action.
Package requireconditional provides the core implementation for the `blend/require-conditional-status-checks` GitHub Action.
template
Package template provides code to populate the `index.template.js` template.
Package template provides code to populate the `index.template.js` template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL