-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
# Lock master branch on tuesdays from 2pm est to 6pm est | ||
name: Lock master branch on tuesdays | ||
|
||
name: Freezes master branch on the specified day | ||
on: | ||
schedule: | ||
- cron: '0 18 * * 2' | ||
|
||
# - cron: '0 18 * * 2' | ||
- cron: '0 0 * * 3' | ||
# Allows you to run this workflow manually from the actions tab | ||
workflow_dispatch: | ||
jobs: | ||
lock-development-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Lock master branch | ||
- name: Code freeze master branch | ||
run: | | ||
git checkout master | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git update-ref refs/heads/master -m "Locking branch" $(date +%s) | ||
git push origin master | ||
curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{secrets.GITHUB_TOKEN}}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/Prosight-dev/prosight-end-ui/branches/development/protection | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
gh api repos/Prosight-dev/prosight-end-ui/branches/development/protection | ||
|
||
echo "hello test" |