diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index 7a6dde6..ee94491 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -15,7 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + run: | + AUTH="$(printf '%s:%s' '${{ secrets.REGISTRY_USERNAME }}' '${{ secrets.REGISTRY_TOKEN }}' | base64 -w0)" + echo "::add-mask::${AUTH}" + git init . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + git -c "http.extraHeader=Authorization: Basic ${AUTH}" \ + fetch --depth=1 origin "${GITHUB_SHA}" + git checkout --detach FETCH_HEAD - name: Set image tags id: meta