1
0
mirror of https://github.com/jumpserver/lina.git synced 2025-05-13 10:34:22 +00:00

chore: lock the pull request when workflow start

This commit is contained in:
ibuler 2024-09-12 10:19:44 +08:00 committed by 老广
parent 41f841532f
commit 9b7c4ed353

View File

@ -15,6 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Lock Pull Request
run: |
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"state":"pending", "description":"Action running, merge disabled", "context":"Lock PR"}' \
"https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}"
- name: Checkout repository
uses: actions/checkout@v4
@ -59,3 +64,9 @@ jobs:
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unlock Pull Request
run: |
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"state":"success", "description":"Action running, merge disabled", "context":"Lock PR"}' \
"https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}"