From 31a3877183f57112612fd54eef5271aaedafcc1a Mon Sep 17 00:00:00 2001 From: Robin Schanbacher Date: Thu, 3 Sep 2026 13:00:31 +0000 Subject: [PATCH] ci: use gitea container hostname for internal network communication --- .gitea/workflows/deploy.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 9e620af..c39cf77 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -15,7 +15,8 @@ jobs: with: repository: ${{ github.repository }} token: ${{ secrets.GITEA_TOKEN }} - repository-url: http://172.17.0.1:3000/${{ github.repository }} + # Nutze den Container-Namen "gitea" anstelle der IP/Host-Adresse + repository-url: http://gitea:3000/${{ github.repository }} ref: main - name: Read Version from package.json @@ -26,7 +27,7 @@ jobs: - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: - registry: 172.17.0.1:3000 + registry: gitea:3000 username: ${{ github.actor }} password: ${{ secrets.GITEA_TOKEN }} @@ -36,8 +37,8 @@ jobs: context: . push: true tags: | - 172.17.0.1:3000/${{ github.repository }}:v${{ env.VERSION }} - 172.17.0.1:3000/${{ github.repository }}:latest + gitea:3000/${{ github.repository }}:v${{ env.VERSION }} + gitea:3000/${{ github.repository }}:latest create-release: name: Create Gitea Release @@ -49,7 +50,7 @@ jobs: with: repository: ${{ github.repository }} token: ${{ secrets.GITEA_TOKEN }} - repository-url: http://172.17.0.1:3000/${{ github.repository }} + repository-url: http://gitea:3000/${{ github.repository }} ref: main - name: Create Release via Gitea API @@ -62,10 +63,10 @@ jobs: PRERELEASE="false" fi - # Prüfen, ob der Release bereits existiert + # API-Aufruf über den Hostnamen "gitea" HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ - "http://172.17.0.1:3000/api/v1/repos/${{ github.repository }}/releases/tags/v$VERSION") + "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..." @@ -80,7 +81,7 @@ jobs: \"draft\": false, \"prerelease\": $PRERELEASE }" \ - "http://172.17.0.1:3000/api/v1/repos/${{ github.repository }}/releases" + "http://gitea:3000/api/v1/repos/${{ github.repository }}/releases" else echo "Release v$VERSION exists already. Skipping." fi \ No newline at end of file