diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 4ffb693a..cf831cf8 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -171,6 +171,7 @@ jobs: # run: | # # Set variables for Gitea host, organization, repository, access token, and release details # GITEA_HOST="repo.retrodeck.net" + # UPLOAD_HOST="upload.retrodeck.net" # ORGANIZATION="RetroDECK" # REPO="RetroDECK-cooker" # GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}" @@ -201,19 +202,22 @@ jobs: # # Upload artifacts # curl -X POST \ # -H "Authorization: token ${GITEA_TOKEN}" \ + # -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ # -H "Content-Type: multipart/form-data" \ # -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 # curl -X POST \ # -H "Authorization: token ${GITEA_TOKEN}" \ + # -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ # -H "Content-Type: multipart/form-data" \ # -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 \ # -H "Authorization: token ${GITEA_TOKEN}" \ + # -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ # -H "Content-Type: multipart/form-data" \ # -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" diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index fde7a737..f71c4446 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -127,6 +127,7 @@ jobs: run: | # Set variables for Gitea host, organization, repository, access token, and release details GITEA_HOST="repo.retrodeck.net" + UPLOAD_HOST="upload.retrodeck.net" ORGANIZATION="RetroDECK" REPO="RetroDECK" GITEA_TOKEN="${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}" @@ -154,21 +155,24 @@ jobs: # Upload artifacts curl -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ + -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ -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 \ -H "Authorization: token ${GITEA_TOKEN}" \ + -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ -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 run: | curl -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ + -H "X-GitHub-Token: ${{ secrets.UPLOAD_TOKEN }}" \ -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: GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }}