RepoOpenAIOpenAIpublished Apr 10, 2024seen 6d

openai/main-branch-check-action

JavaScript

Open original ↗

Captured source

source ↗
published Apr 10, 2024seen 6dcaptured 8hhttp 200method plain

openai/main-branch-check-action

Description: A GitHub Action for checking the status of a workflow on the main branch as a status on the PR

Language: JavaScript

License: MIT

Stars: 10

Forks: 2

Open issues: 1

Created: 2024-04-10T21:49:00Z

Pushed: 2026-04-08T04:12:21Z

Default branch: main

Fork: no

Archived: yes

README: NOTE: This repo is no longer maintained, instead you may want to try https://github.com/jaymzh/main-branch-check-action

main-branch-check action

![Build](https://github.com/openai/main-branch-check-action/actions/workflows/build.yaml)

This check will determine the workflow it was called from, then see if tha workflow has run on master, and if it has, ensure it is passing.

To bypass this (e.g. if your PR is the fix), you can add:

[ci override_main_branch_checks $WORKFLOW]'

Or you to set all checks to non-fatal, you can do:

[ci override_main_branch_checks]

to your PR description.

Using

To use this, add a step into your workflow like:

- name: Main Branch Check
# Do the check even if the PR failed elsewhere,
# but don't do it if we're on
if: always() && github.ref != 'refs/heads/main'
uses: ./.github/actions/main-branch-check
permissions:

with:
gh_token: ${{ secrets.SOME_TOKEN }}
main_branch: "master"
workflow_ref: ${{ github.workflow_ref }}

You will need a token that has the 'workflow' scope, and read/write access to pull-requests.

Updating

If you update the code, run:

make

to build the self-contained bundle.

If you update dependencies you'll need to run npm install first