From e3e12afa0d530a41d420a48eb6c5e2d8e0aed49e Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Sun, 23 Aug 2026 17:32:09 +0200 Subject: [PATCH] Aktualisiere Authentifizierungsmethode und erweitere TOKEN-Definition in CI/CD-Workflows --- .gitea/workflows/dev.yml | 11 ++++++----- .gitea/workflows/main.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index b282f40..4aae563 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -51,13 +51,14 @@ jobs: env: GITEA_URL: ${{ gitea.server_url || github.server_url }} REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }} - TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} + ACTOR: ${{ gitea.actor || github.actor }} + TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} run: | echo "Veröffentliche Debian-Paket (Distribution: testing, Component: main)..." for deb in target/debian/*.deb; do [ -f "$deb" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$deb" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/testing/main/upload" done @@ -66,7 +67,7 @@ jobs: for rpm in target/generate-rpm/*.rpm; do [ -f "$rpm" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$rpm" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/testing/upload" done @@ -75,7 +76,7 @@ jobs: for pkg in target/arch/*.pkg.tar.zst; do [ -f "$pkg" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$pkg" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/arch/testing/upload" done @@ -84,7 +85,7 @@ jobs: env: GITEA_URL: ${{ gitea.server_url || github.server_url }} REPO: ${{ gitea.repository || github.repository }} - TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} + TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} run: | VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" TAG_NAME="v${VERSION}-preview" diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index a83b33f..898bfa6 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -51,13 +51,14 @@ jobs: env: GITEA_URL: ${{ gitea.server_url || github.server_url }} REPO_OWNER: ${{ gitea.repository_owner || github.repository_owner }} - TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} + ACTOR: ${{ gitea.actor || github.actor }} + TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} run: | echo "Veröffentliche Debian-Paket (Distribution: stable, Component: main)..." for deb in target/debian/*.deb; do [ -f "$deb" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$deb" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/debian/pool/stable/main/upload" done @@ -66,7 +67,7 @@ jobs: for rpm in target/generate-rpm/*.rpm; do [ -f "$rpm" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$rpm" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/rpm/stable/upload" done @@ -75,7 +76,7 @@ jobs: for pkg in target/arch/*.pkg.tar.zst; do [ -f "$pkg" ] || continue curl -f -s -S -X PUT \ - -H "Authorization: token ${TOKEN}" \ + --user "${ACTOR}:${TOKEN}" \ --upload-file "$pkg" \ "${GITEA_URL}/api/packages/${REPO_OWNER}/arch/stable/upload" done @@ -84,7 +85,7 @@ jobs: env: GITEA_URL: ${{ gitea.server_url || github.server_url }} REPO: ${{ gitea.repository || github.repository }} - TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} + TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }} run: | VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" TAG_NAME="v${VERSION}"