Skip to content

Commit

Permalink
Update newcheck.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshith B <[email protected]>
  • Loading branch information
Rakshithb1 authored Jan 16, 2024
1 parent d300676 commit 2152c77
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/newcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2




- name: Get branch protection rule
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $G_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$REPO_NAME/branches/$BRANCH_NAME/protection/required_status_checks/contexts
- name: Add branch protection rule
run: |
tail -n +2 .github/workflows/check.csv | while IFS=, read -r REPO_NAME BRANCH_NAME CHECKS; do
set -x # Enable debugging
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
Expand Down

0 comments on commit 2152c77

Please sign in to comment.