WORKFLOWS: fixing cloudflare artifact limit [skip ci]

This commit is contained in:
XargonWan 2024-05-24 17:19:04 +02:00
parent 284cf65d81
commit bfd41858b3
2 changed files with 14 additions and 6 deletions

View file

@ -171,6 +171,7 @@ jobs:
# run: | # run: |
# # Set variables for Gitea host, organization, repository, access token, and release details # # Set variables for Gitea host, organization, repository, access token, and release details
# GITEA_HOST="repo.retrodeck.net" # GITEA_HOST="repo.retrodeck.net"
# UPLOAD_HOST="upload.retrodeck.net"
# ORGANIZATION="RetroDECK" # ORGANIZATION="RetroDECK"
# REPO="RetroDECK-cooker" # REPO="RetroDECK-cooker"
# GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}" # GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}"
@ -201,19 +202,22 @@ jobs:
# # Upload artifacts # # Upload artifacts
# curl -X POST \ # curl -X POST \
# -H "Authorization: token ${GITEA_TOKEN}" \ # -H "Authorization: token ${GITEA_TOKEN}" \
# -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
# -H "Content-Type: multipart/form-data" \ # -H "Content-Type: multipart/form-data" \
# -F "attachment=@RetroDECK-cooker.flatpak" \ # -F "attachment=@RetroDECK-cooker.flatpak" \
# "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak" # "http://$UPLOAD_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak"
# # Upload artifacts sha # # Upload artifacts sha
# curl -X POST \ # curl -X POST \
# -H "Authorization: token ${GITEA_TOKEN}" \ # -H "Authorization: token ${GITEA_TOKEN}" \
# -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
# -H "Content-Type: multipart/form-data" \ # -H "Content-Type: multipart/form-data" \
# -F "attachment=@RetroDECK-cooker.flatpak.sha" \ # -F "attachment=@RetroDECK-cooker.flatpak.sha" \
# "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak.sha" # "http://$UPLOAD_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak.sha"
# curl -X POST \ # curl -X POST \
# -H "Authorization: token ${GITEA_TOKEN}" \ # -H "Authorization: token ${GITEA_TOKEN}" \
# -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
# -H "Content-Type: multipart/form-data" \ # -H "Content-Type: multipart/form-data" \
# -F "attachment=@RetroDECK-Artifact.tar.gz" \ # -F "attachment=@RetroDECK-Artifact.tar.gz" \
# "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-Artifact.tar.gz" # "http://$UPLOAD_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-Artifact.tar.gz"

View file

@ -127,6 +127,7 @@ jobs:
run: | run: |
# Set variables for Gitea host, organization, repository, access token, and release details # Set variables for Gitea host, organization, repository, access token, and release details
GITEA_HOST="repo.retrodeck.net" GITEA_HOST="repo.retrodeck.net"
UPLOAD_HOST="upload.retrodeck.net"
ORGANIZATION="RetroDECK" ORGANIZATION="RetroDECK"
REPO="RetroDECK" REPO="RetroDECK"
GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}" GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}"
@ -154,21 +155,24 @@ jobs:
# Upload artifacts # Upload artifacts
curl -X POST \ curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@RetroDECK.flatpak" \ -F "attachment=@RetroDECK.flatpak" \
"http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak" "http://$UPLOAD_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak"
curl -X POST \ curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@RetroDECK-Artifact.tar.gz" \ -F "attachment=@RetroDECK-Artifact.tar.gz" \
"http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-Artifact.tar.gz" "http://$UPLOAD_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-Artifact.tar.gz"
- name: Upload RetroDECK.flatpak.sha to Gitea Release - name: Upload RetroDECK.flatpak.sha to Gitea Release
run: | run: |
curl -X POST \ curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \
-F "file=@RetroDECK.flatpak.sha" \ -F "file=@RetroDECK.flatpak.sha" \
"https://repo.retrodeck.net/RetroDECK/RetroDECK/releases/${{ env.REL_VER }}/assets?name=RetroDECK.flatpak.sha" "https://$UPLOAD_HOST/RetroDECK/RetroDECK/releases/${{ env.REL_VER }}/assets?name=RetroDECK.flatpak.sha"
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}