From 52e798e6e3708a303b0c5a03ed3b7730615cff23 Mon Sep 17 00:00:00 2001 From: InAnYan Date: Fri, 31 Jul 2026 13:47:03 +0200 Subject: [PATCH] feat: update --- .gitea/workflows/deploy-infrastructure.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/deploy-infrastructure.yml b/.gitea/workflows/deploy-infrastructure.yml index 85d1723..08c7ccd 100644 --- a/.gitea/workflows/deploy-infrastructure.yml +++ b/.gitea/workflows/deploy-infrastructure.yml @@ -39,27 +39,12 @@ jobs: - name: Setup OpenTofu uses: opentofu/setup-opentofu@v1 - - name: Configure and Debug Authentication + - name: Configure Git Authentication run: | - echo "=== Debug: Variable Check ===" - echo "Raw Server URL: ${{ gitea.server_url }}" + GITEA_HOST="git.itlab-ffeks.dnu.edu.ua" - # Extract just the hostname (e.g., git.itlab-ffeks.dnu.edu.ua) - GITEA_HOST=$(echo "${{ gitea.server_url }}" | awk -F/ '{print $3}') - echo "Extracted Hostname: $GITEA_HOST" - - # Write it to .netrc (Git and cURL use this automatically for auth) echo "machine $GITEA_HOST login ${{ gitea.actor }} password ${{ secrets.GITEA_TOKEN }}" > ~/.netrc chmod 600 ~/.netrc - - echo "=== Debug: .netrc Check ===" - ls -la ~/.netrc - # Print the file contents but mask the password to avoid leaking it in logs - cat ~/.netrc | sed 's/password .*/password ****/' - - echo "=== Debug: Testing Git Connection directly ===" - # Try to reach the module repo directly using Git to see if auth works - git ls-remote "https://$GITEA_HOST/infrastructure/proxmox-vm.git" HEAD || echo "Git test failed, but continuing to see Tofu output..." - name: OpenTofu Init & Apply run: |