github actions: filter http codes in other places, not only when publishing changes
This commit is contained in:
parent
1e88cca692
commit
750a529467
|
@ -193,7 +193,7 @@ jobs:
|
||||||
https://packages.termux.org/aptly-api/files/${REPOSITORY_NAME}-${{ github.sha }}
|
https://packages.termux.org/aptly-api/files/${REPOSITORY_NAME}-${{ github.sha }}
|
||||||
)
|
)
|
||||||
|
|
||||||
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
http_status_code=$(echo "$curl_response" | cut -d'|' -f2 | grep -oP '\d{3}$')
|
||||||
|
|
||||||
if [ "$http_status_code" != "200" ]; then
|
if [ "$http_status_code" != "200" ]; then
|
||||||
echo "[$(date +%H:%M:%S)] Warning: server returned $http_status_code code while deleting temporary directory."
|
echo "[$(date +%H:%M:%S)] Warning: server returned $http_status_code code while deleting temporary directory."
|
||||||
|
@ -217,7 +217,7 @@ jobs:
|
||||||
https://packages.termux.org/aptly-api/files/${REPOSITORY_NAME}-${{ github.sha }} || true
|
https://packages.termux.org/aptly-api/files/${REPOSITORY_NAME}-${{ github.sha }} || true
|
||||||
)
|
)
|
||||||
|
|
||||||
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
http_status_code=$(echo "$curl_response" | cut -d'|' -f2 | grep -oP '\d{3}$')
|
||||||
|
|
||||||
if [ "$http_status_code" = "200" ]; then
|
if [ "$http_status_code" = "200" ]; then
|
||||||
echo "[$(date +%H:%M:%S)] Uploaded: $(echo "$curl_response" | cut -d'|' -f1 | jq -r '.[]' | cut -d'/' -f2)"
|
echo "[$(date +%H:%M:%S)] Uploaded: $(echo "$curl_response" | cut -d'|' -f1 | jq -r '.[]' | cut -d'/' -f2)"
|
||||||
|
@ -254,7 +254,7 @@ jobs:
|
||||||
--write-out "|%{http_code}" \
|
--write-out "|%{http_code}" \
|
||||||
https://packages-cf.termux.org/aptly-api/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${{ github.sha }} || true
|
https://packages-cf.termux.org/aptly-api/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${{ github.sha }} || true
|
||||||
)
|
)
|
||||||
http_status_code=$(echo "$curl_response" | cut -d'|' -f2)
|
http_status_code=$(echo "$curl_response" | cut -d'|' -f2 | grep -oP '\d{3}$')
|
||||||
|
|
||||||
if [ "$http_status_code" = "200" ]; then
|
if [ "$http_status_code" = "200" ]; then
|
||||||
warnings=$(echo "$curl_response" | cut -d'|' -f1 | jq '.Report.Warnings' | jq -r '.[]')
|
warnings=$(echo "$curl_response" | cut -d'|' -f1 | jq '.Report.Warnings' | jq -r '.[]')
|
||||||
|
|
Loading…
Reference in New Issue