Updated create PR logic and added in Gitea List PR action.
This commit is contained in:
@@ -14,6 +14,12 @@ jobs:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: PR List (Action)
|
||||
id: list-prs-action
|
||||
uses: vicamo/gitea-list-pull-requests@v1.0.1
|
||||
with:
|
||||
state: open
|
||||
|
||||
- name: PR list
|
||||
id: list-prs
|
||||
run: |
|
||||
@@ -22,10 +28,11 @@ jobs:
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||
-sS | jq '{index: .number, state: .state}')
|
||||
echo "PR List: ${pr_check}"
|
||||
pr_state=$(echo ${pr_check} | jq -r '.state')
|
||||
|
||||
- name: Create PR
|
||||
if: steps.list-prs.outputs.pr_state != 'open'
|
||||
if: steps.list-prs.outputs.pr_state = null
|
||||
uses: arifer612/Gitea-PR-action@v1.2.0
|
||||
with:
|
||||
url: ${{ gitea.server_url }}
|
||||
|
||||
Reference in New Issue
Block a user