Compare commits

..

4 Commits

Author SHA1 Message Date
sappho
a68d43454c
un-test 2025-09-26 20:43:29 -04:00
sappho
ebd5e0050a
temp use test project 2025-09-26 20:04:41 -04:00
sappho
173a8cab2e
fix evil bug with exit ${HTTP_CODE} 2025-09-26 19:58:16 -04:00
sappho
8e1294c43f
update for use with repo secrets 2025-09-26 19:51:40 -04:00

View File

@ -146,14 +146,18 @@ jobs:
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
shell: bash
working-directory: build/package
#
# AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.UPLOAD_PASSWORD }}' | base64)"
run: |
echo "Begin upload..."
AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
AUTHORIZATION="$(echo -n 'builds:${{ secrets.UPLOAD_PASSWORD }}' | base64)"
echo "::add-mask::${AUTHORIZATION}"
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
if test ${HTTP_CODE} -ne 200; then
exit ${HTTP_CODE}
echo "server returned HTTP status ${HTTP_CODE}!!"
exit 254
# we can not exit ${HTTP_CODE}, bash only goes up to a maximum of exit 255, and http has more codes than that!
fi
echo "Upload successful!"