From 702332c299050095d403241b88ee31353e7549ff Mon Sep 17 00:00:00 2001 From: Robin Schanbacher Date: Thu, 3 Sep 2026 13:57:56 +0000 Subject: [PATCH] .gitea/workflows/deploy.yaml aktualisiert --- .gitea/workflows/deploy.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 61a9166..585b666 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -21,10 +21,14 @@ jobs: repository-url: http://gitea:3000/${{ github.repository }} ref: main - - name: Read Version from package.json + - name: Read Version & Lowercase Repo Name run: | VERSION=$(jq -r '.version' package.json) echo "VERSION=$VERSION" >> $GITHUB_ENV + + # Repository-Name in Kleinbuchstaben umwandeln (z.B. schanbro/psalmtafel) + REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') + echo "REPO_LOWER=$REPO_LOWER" >> $GITHUB_ENV - name: Log in to Gitea Container Registry run: | @@ -37,13 +41,13 @@ jobs: context: . push: false tags: | - gitea:3000/${{ github.repository }}:${{ github.ref_name }} - gitea:3000/${{ github.repository }}:latest + gitea:3000/${{ env.REPO_LOWER }}:${{ github.ref_name }} + gitea:3000/${{ env.REPO_LOWER }}:latest - name: Images zu Gitea pushen run: | - docker push gitea:3000/${{ github.repository }}:${{ github.ref_name }} - docker push gitea:3000/${{ github.repository }}:latest + docker push gitea:3000/${{ env.REPO_LOWER }}:${{ github.ref_name }} + docker push gitea:3000/${{ env.REPO_LOWER }}:latest create-release: name: Create Gitea Release @@ -54,7 +58,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ github.repository }} - token: ${{ secrets.GITEA_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} repository-url: http://gitea:3000/${{ github.repository }} ref: main @@ -69,13 +73,13 @@ jobs: fi HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ "http://gitea:3000/api/v1/repos/${{ github.repository }}/releases/tags/v$VERSION") if [ "$HTTP_STATUS" -eq 404 ]; then echo "Creating release v$VERSION in Gitea..." curl -X POST \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/json" \ -d "{ \"tag_name\": \"v$VERSION\", -- 2.54.1