diff --git a/.gitea/workflows/wf_full_p10.yaml b/.gitea/workflows/wf_full_p10.yaml index d3ab985..124fbb9 100644 --- a/.gitea/workflows/wf_full_p10.yaml +++ b/.gitea/workflows/wf_full_p10.yaml @@ -66,12 +66,10 @@ jobs: - name: Send notification if build crashed if: ${{ steps.build-script.outcome != 'success' }} run: | - issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r) - if [[ $issueid != '' ]]; then \ - body="Building images finish with some errors."; \ - curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s;\ - echo "notification about test error is sent to issue $issueid"; \ - else echo "no issue to send notification"; fi + issueid=1 + body="Building images finish with some errors." + curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s + echo "notification about test error is sent to issue $issueid" env: T: ${{ secrets.TOKEN }} BR: ${{ env.BRANCH }} @@ -117,13 +115,11 @@ jobs: - name: Send notification if test crashed if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }} run: | - issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r) - if [[ $issueid != '' ]]; then \ - errors=$(cat errors.log); \ - body="Testing images finish with some errors. $errors"; \ - curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s; \ - echo "notification about test error is sent to issue $issueid"; \ - else echo "no issue to send notification"; fi + issueid=1 + errors=$(cat errors.log) + body="Testing images finish with some errors. $errors" + curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s + echo "notification about test error is sent to issue $issueid" env: T: ${{ secrets.TOKEN }} BR: ${{ needs.build-process.outputs.branch }} diff --git a/.gitea/workflows/wf_full_sis.yaml b/.gitea/workflows/wf_full_sis.yaml index b492e28..753186a 100644 --- a/.gitea/workflows/wf_full_sis.yaml +++ b/.gitea/workflows/wf_full_sis.yaml @@ -66,12 +66,10 @@ jobs: - name: Send notification if build crashed if: ${{ steps.build-script.outcome != 'success' }} run: | - issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r) - if [[ $issueid != '' ]]; then \ - body="Building images finish with some errors."; \ - curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s;\ - echo "notification about test error is sent to issue $issueid"; \ - else echo "no issue to send notification"; fi + issueid=1 + body="Building images finish with some errors." + curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s + echo "notification about test error is sent to issue $issueid" env: T: ${{ secrets.TOKEN }} BR: ${{ env.BRANCH }} @@ -117,13 +115,11 @@ jobs: - name: Send notification if test crashed if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }} run: | - issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r) - if [[ $issueid != '' ]]; then \ - errors=$(cat errors.log); \ - body="Testing images finish with some errors. $errors"; \ - curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s; \ - echo "notification about test error is sent to issue $issueid"; \ - else echo "no issue to send notification"; fi + issueid=1 + errors=$(cat errors.log) + body="Testing images finish with some errors. $errors" + curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s + echo "notification about test error is sent to issue $issueid" env: T: ${{ secrets.TOKEN }} BR: ${{ needs.build-process.outputs.branch }}