From 65ca246241808d9a6450e27503a6ac09ab012dc1 Mon Sep 17 00:00:00 2001 From: HaimKortovich Date: Tue, 31 Mar 2026 17:00:09 -0500 Subject: [PATCH] strip another way --- .gitea/workflows/build-and-publish.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 49a4be1..230cd56 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -16,9 +16,18 @@ jobs: runs-on: nix steps: - name: Checkout via Native Git + env: + GITEA_URL: ${{ github.server_url }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + SHA: ${{ github.sha }} run: | - git clone --depth 1 https://token:${{ secrets.GITHUB_TOKEN }}@${{ format('{0}', replace(github.server_url, 'https://', '')) }}/${{ github.repository }}.git . - git checkout ${{ github.sha }} + STRIPPED_URL=$(echo $GITEA_URL | sed -e 's|^https://||' -e 's|^http://||') + echo "Cloning from: $STRIPPED_URL" + # Perform the clone + git clone --depth 1 "https://token:${TOKEN}@${STRIPPED_URL}/${REPO}.git" . + # Checkout the specific commit + git checkout $SHA - name: Build Docker Image via Nix Flake run: |