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 a8a65f8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# 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
permissions:
contents: read
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 a8a65f8

Please sign in to comment.