This commit is contained in:
@@ -163,7 +163,7 @@ jobs:
|
|||||||
|
|
||||||
echo ">> Gitea API Response Body ...
|
echo ">> Gitea API Response Body ...
|
||||||
echo "----
|
echo "----
|
||||||
cat /tmp/pr_response.json
|
echo "$(cat /tmp/pr_response.json)"
|
||||||
echo "----
|
echo "----
|
||||||
|
|
||||||
if [ "$HTTP_STATUS" == "201" ]; then
|
if [ "$HTTP_STATUS" == "201" ]; then
|
||||||
@@ -175,16 +175,19 @@ jobs:
|
|||||||
|
|
||||||
elif [ "$HTTP_STATUS" == "422" ]; then
|
elif [ "$HTTP_STATUS" == "422" ]; then
|
||||||
echo ">> Failed to create PR (HTTP 422: Unprocessable Entity), PR may already exist"
|
echo ">> Failed to create PR (HTTP 422: Unprocessable Entity), PR may already exist"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
echo ">> Failed to create PR, HTTP status code: $HTTP_STATUS"
|
||||||
|
|
||||||
echo ">> Removing branch: ${HEAD_BRANCH}"
|
|
||||||
git push origin --delete ${HEAD_BRANCH}
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Cleanup Branch
|
||||||
|
if: failure() && steps.create-pull-request.outcome == 'failure'
|
||||||
|
env:
|
||||||
|
HEAD_BRANCH: ${{ steps.commit-push.outputs.HEAD_BRANCH }}
|
||||||
|
run: |
|
||||||
|
echo ">> Removing branch: ${HEAD_BRANCH}"
|
||||||
|
git push origin --delete ${HEAD_BRANCH}
|
||||||
|
|
||||||
# - name: ntfy Created
|
# - name: ntfy Created
|
||||||
# uses: niniyas/ntfy-action@master
|
# uses: niniyas/ntfy-action@master
|
||||||
# if: steps.create-pull-request.outputs.pull-request-operation == 'created'
|
# if: steps.create-pull-request.outputs.pull-request-operation == 'created'
|
||||||
|
|||||||
Reference in New Issue
Block a user