.
This commit is contained in:
@@ -27,20 +27,12 @@ jobs:
|
|||||||
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 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
|
tea login default gitea-rinoa
|
||||||
echo "Checking if PR exists for ${{ github.ref_name }}"
|
echo "Checking if PR exists for ${{ github.ref_name }}"
|
||||||
tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state
|
tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep -q '${{ github.ref_name }}'
|
||||||
tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep -q '${{ github.ref_name }}'
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "PR exists, checking state..."
|
echo "PR exists, skipping creation..."
|
||||||
pr_state=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep '${{ github.ref_name }}' | awk -F',' '{print $4}' | sed -e 's|"||g')
|
|
||||||
if [ "${pr_state}" != 'open' ]; then
|
|
||||||
echo "No open PRs exist, creating one now beep boop..."
|
|
||||||
tea pr c -r "${{ github.repository }}" -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
|
||||||
elif [ "${pr_state}" = 'open' ]; then
|
|
||||||
echo "PR already exists, skipping creation..."
|
|
||||||
fi
|
|
||||||
elif [ $? -eq 1 ]; then
|
elif [ $? -eq 1 ]; then
|
||||||
echo "PR does not exist, creating..."
|
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 }}"
|
tea pr c -r "${{ github.repository }}" -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker-compose-test:
|
docker-compose-test:
|
||||||
|
|||||||
Reference in New Issue
Block a user