mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-31 22:48:27 +00:00
chore: lock the pull request when workflow start
This commit is contained in:
11
.github/workflows/build-base-image.yml
vendored
11
.github/workflows/build-base-image.yml
vendored
@@ -15,6 +15,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -59,3 +64,9 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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 }}"
|
||||||
|
Reference in New Issue
Block a user