Giter Club home page Giter Club logo

check-all-ci-completion-action's Introduction

Check All CI Completion (GitHub Actions)

英語(Eng) | 日本語(JP)

This repository publishes GitHub Actions that make it easier to use Auto Merge when using multiple CIs.

Concept

If you have multiple CIs in a pull request, each working only under certain conditions, you cannot use GitHub Auto-Merge to force a specific CI to succeed.

For example, in the following figure, the Bazel and Spanner jobs are running and the Kubernetes Manifest job is not.

multi-job

In this case, no matter which job is required to complete, Auto-Merge cannot be used depending on the content of the update.

Check All CI Completion checks if all launched CIs are successful or not. This makes it easier to use GitHub Auto-merge by forcing the Check All CI Completion job to succeed.

check-job

Usage

- uses: lirlia/[email protected]
  with:
    # Default: 1800 seconds
    # How long maintains this CI (This job waits for another jobs completion)
    job-idle-seconds: '1800'
    # Default: 300 seconds
    # Sleep seconds between check another jobs status
    sleep-seconds: '300'

Full yaml (for main branch)

name: check-all-ci-result
on:
  push:
    branches:
      - '**'        # matches every branch
      - '!main'     # excludes main
jobs:
  check-another-ci:
    name: check
    runs-on: ubuntu-20.04
    steps:
      - uses: lirlia/[email protected]

GitHub Setting

  • [Setting] → [Branches] → [Branch protection rule] → [Edit]
  • enable "Require status checks to pass before merging"
  • enable "Require branches to be up to date before merging"
  • set "check" in "Status checks that are required."

⚠️Caution⚠️

This job will be charged for GitHub Actions because it will continue to wait while waiting for other jobs to complete. Therefore, depending on your use case, you may be charged an unexpected amount.

License

License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.