Add check before trying to merge PR

This commit is contained in:
marked 2025-03-02 19:29:28 +01:00
parent 9d968eaa8b
commit 849d2f361a

View file

@ -96,6 +96,9 @@ jobs:
token: ${{ secrets.privileged_forgejo_token }}
- name: Merge Pull Request
shell: bash
run: |
fj --host git.devmarked.win auth add-key marked ${{ secrets.privileged_forgejo_token }}
fj --host git.devmarked.win pr merge --method squash "${{ steps.create_pull_request.outputs.pull-request-number }}"
if [ ! -z "${{ steps.create_pull_request.outputs.pull-request-number }}" ]; then
fj --host git.devmarked.win auth add-key marked ${{ secrets.privileged_forgejo_token }}
fj --host git.devmarked.win pr merge --method squash "${{ steps.create_pull_request.outputs.pull-request-number }}"
fi