diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f70f9f4..9014f98 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,6 +40,8 @@ jobs: ls -lh dist/rpm/RPMS/*/*.rpm 2>/dev/null || true - name: Publish to Gitea Package Registry + env: + PKG_TOKEN: ${{ secrets.PACKAGES_GENERATION || secrets.GITHUB_TOKEN }} run: | echo "=== Publishing to Gitea Package Registry ===" RPM_FILE=$(find dist/rpm/RPMS -name "*.rpm" 2>/dev/null | head -n 1) @@ -48,7 +50,7 @@ jobs: if [ -n "$RPM_FILE" ] && [ -f "$RPM_FILE" ]; then echo "Uploading RPM: $RPM_FILE" HTTP_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" -X PUT \ - -u "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.actor }}:${PKG_TOKEN}" \ --upload-file "$RPM_FILE" \ "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload") echo "RPM Registry HTTP status: $HTTP_CODE" @@ -57,7 +59,7 @@ jobs: if [ -n "$DEB_FILE" ] && [ -f "$DEB_FILE" ]; then echo "Uploading DEB: $DEB_FILE" HTTP_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" -X PUT \ - -u "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.actor }}:${PKG_TOKEN}" \ --upload-file "$DEB_FILE" \ "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/debian/pool/stable/main/upload") echo "Debian Registry HTTP status: $HTTP_CODE"