Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
eiberham committed May 10, 2023
1 parent 6bf843d commit 7e66a5d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/lock.yml
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 }}
5 changes: 5 additions & 0 deletions test.sh
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"

0 comments on commit 7e66a5d

Please sign in to comment.