GitHub Action: Compose multiple (conditional) checks into a single check based on file paths in a pull request

GitHub Action: Composite

Example Usage

---
name: All Checks

on:
  pull_request:
    branches:
    - main

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

    steps:
    - name: Ensure All Conditional Checks Have Passed
      uses: blend/[email protected]
      with:
        checks-yaml: |
          - job: sleep1
          - job: sleep2
            paths:
            - changed/**
            - prefix/**

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

# ...
    steps:
    - name: Ensure All Conditional Checks Have Passed
      uses: blend/[email protected]
      with:
        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/action-composite to determine which checks to enforce.

Development

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

Owner
Blend
Bringing simplicity and transparency to consumer finance.
Blend
Comments
  • Check is not complete: Status: unknown, Run ID: unknown

    Check is not complete: Status: unknown, Run ID: unknown

    Hey @dvdliao any ideas on why this might be happening?

    image

    I've made sure I've named all our tasks differently.

    Also I thought since some tasks we're running on pull_request_target I've thought that would have something to do (as detailed on #12) and changed them to pull_request but no luck still.

  • Rename repo to `require-conditional-status-checks`

    Rename repo to `require-conditional-status-checks`

    Goal https://github.com/blend/require-conditional-status-check is based on the "official" terms. Of the 4 words in the repo name, "conditional" is the only terminology that isn't explicitly one used by GitHub:

    Screen Shot 2022-01-31 at 1 44 58 PM

    Concrete tasks to carry out:

    • Rename repo on GitHub
    • Update go.mod and package imports for new name
    • Generate new screenshots of workflows with new action name (after release? maybe cheat and use a branch with same name as release tag)
    • Cut a release post-rename
    • Make sure the GitHub Actions marketplace reflects the change

    Also worth doing (but not part of rename):

    • Rename main to release branch
    • Make release branch the default (so it shows up in GitHub Actions marketplace)
    • Put the "real" README.md in the release branch too (this is more manual, but worth it since that README shows up in the marketplace)
  • Remove vendor folder

    Remove vendor folder

    Hey, thanks for that action, this is super useful!

    I'm a bit worried about the vendor folder though as it's hard to audit. With go modules and GOSUMDB it should not be necessary, should it?

  • Bug: `os.platform() == 'windows'` will never match

    Bug: `os.platform() == 'windows'` will never match

    https://nodejs.org/docs/latest-v16.x/api/os.html#osplatform

    Returns a string identifying the operating system platform. The value is set at compile time. Possible values are 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'.

  • Fail faster if no jobs were found

    Fail faster if no jobs were found

    Right now I have a timeout of 15 minutes but since the job aren't being actually found (#12) it will stay like that until timeout:

    image

    It would be nice to have a setting like: "Fail at X seconds if no jobs are actually found/run"

  • Adds missing test cases for gitignore

    Adds missing test cases for gitignore

    Related to #10

    It seems there are some inconsistencies between the gitgnore pattern matching in the current implementation.

    This PR attempts to add some missing cases so they can be reproduced and hopefully fixed.

    @dvdliao @dhermes I can take a stab into fixing these if that's ok. My guess is that it has to to with the normalization we're doing before.

  • Any usage examples?

    Any usage examples?

    I know there are some usage examples in the README but it would be nice to have an actual example repo that we can fork and play with it to actually test it.

  • Add support for statuses

    Add support for statuses

    Hi,

    Thanks for your action; it's pretty convenient in our monorepo environment.

    Some of our "checks" are in fact "statuses" (see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) POSTed to Github API by custom tools and I'm wondering how hard it would be to add support for statuses on top of regular checks ? Right now, the action just don't recognize the statuses; and wait for "checks" until timing out.

    Maybe adding statuses here would be a start? https://github.com/blend/require-conditional-status-checks/blob/development/pkg/requireconditional/run.go#L117

    Happy to have any guidance before I have a look at it.

    Thanks

Compose Switch is a replacement to the Compose V1 docker-compose (python) executable

Compose Switch Compose Switch is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 do

Jan 8, 2023
An action that comments PipeCD's PlanPreview result on GitHub pull request.
An action that comments PipeCD's PlanPreview result on GitHub pull request.

actions-plan-preview An action that comments PipeCD's PlanPreview result on GitHub pull request. This action can be used for all application kinds: Ku

Apr 6, 2022
pr-bullet is a tool for copying pull request to multiple repositories.

pr-bullet pr-bullet is a tool for copying pull request to multiple repositories. Usage First, create original pull request ( ex. https://github.com/k1

Oct 5, 2022
Easily run your Compose application to the cloud with compose-cli

This CLI tool makes it easy to run Docker containers and Docker Compose applications in the cloud using either Amazon Elastic Container Service (ECS) or Microsoft Azure Container Instances (ACI) using the Docker commands you already know.

Jan 8, 2023
Mutagen Compose is a modified version of Docker Compose that offers automated integration with Mutagen.

Mutagen Compose Mutagen Compose is a (minimally) modified version of Docker Compose that offers automated integration with Mutagen. This allows you to

Dec 22, 2022
A GitHub CLI extension that provides summary pull request metrics.

gh-metrics A gh extension that provides summary pull request metrics. Usage Metric definitions Influences Usage To install the extension use: $ gh ext

Dec 29, 2022
GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.
GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

Jan 2, 2023
Shell script to download and set GO environmental paths to allow multiple versions.
Shell script to download and set GO environmental paths to allow multiple versions.

gobrew gobrew lets you easily switch between multiple versions of go. It is based on rbenv and pyenv. Installation The automatic installer You can ins

Nov 3, 2022
Execute multiple shell commands like Docker-Compose

parx parx is a simple tool to run multiple commands in parallel while having the output structured like Docker Compose does that. This is useful when

Aug 15, 2022
Controller-check - Run checks against K8s controllers to verify if they meets certain conventions

controller-check Run checks against K8s controllers to verify if they meets cert

Jan 4, 2022
Bubbleboxer - compose bubbles into boxes

bubbleboxer ?? - compose bubbles into boxes ?? A way to compose multiple bubbles

Dec 20, 2022
Dotnet-appsettings-env - Convert .NET appsettings.json file to Kubernetes, Docker and Docker-Compose environment variables

dotnet-appsettings-env Convert .NET appsettings.json file to Kubernetes, Docker

Dec 30, 2022
Dotnet-appsettings-env - Convert .NET appsettings.json file to Kubernetes, Docker and Docker-Compose environment variables

dotnet-appsettings-env Convert .NET appsettings.json file to Kubernetes, Docker

Feb 16, 2022
Stacked Pull Requests on GitHub

spr : Stacked Pull Requests Workflow on GitHub What are Stacked Diffs / Pull Requests? Long explanation: https://jg.gg/2018/09/29/stacked-diffs-versus

Jan 2, 2023
Just a playground with some interesting concepts like pipelines aka middleware, handleFuncs, request validations etc. Check it out.

Pipeline a.k.a middleware in Go Just a playground with some interesting concepts like pipelines aka middleware, handleFuncs, request validations etc.

Dec 9, 2021
Export GitHub Action Workflow data as traces via OTLP

Github Action to OTLP NOTE: This is still work in progress This action outputs Github Action workflows and jobs details to OTLP via gRPC. Inputs endpo

Nov 1, 2022
A Github action to annotate problematic parts sequences.

dna-annotate A Github action to annotate problematic sequences from given Genbank files. dna-annotate is a Github Action that receives a path for an i

Feb 21, 2022
GitHub Action to identify a path of changed files on monorepos, with regex and depth validation.

github-action-go GitHub Action to identify a path of changed files on monorepos, with regex and depth validation. Example use-case is execution path f

Mar 1, 2022
Clones github projects into ~/Projects/github/{org}/{repo}

Tidy clone Github cli extension (gh extension) to clone repos into ~/Projects/github/{org}/{repo} on the local filesystem Install gh extension install

Jan 19, 2022