.
This commit is contained in:
@@ -26,13 +26,18 @@ jobs:
|
||||
run: |
|
||||
tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||
tea login default gitea-rinoa
|
||||
echo "Checking if PR exists for ${{ github.ref_name }}"
|
||||
tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep -q '${{ github.ref_name }}'
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
echo "Checking if PR exists for branch: ${{ github.ref_name }}"
|
||||
PR_EXISTS=$(tea pr ls --repo "${{ github.repository }}" --state open --fields index,title,head,state --output csv | grep -c "${{ github.ref_name }}")
|
||||
|
||||
if [ "$PR_EXISTS" -ge 1 ]; then
|
||||
echo "PR exists, skipping creation..."
|
||||
elif [ $? -eq 1 ]; then
|
||||
elif [ "$PR_EXISTS" -eq 0 ]; then
|
||||
echo "PR does not exist, creating PR..."
|
||||
tea pr c -r "${{ github.repository }}" -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
||||
else
|
||||
echo "Error determining PR status. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker-compose-test:
|
||||
|
||||
Reference in New Issue
Block a user