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: |