diff --git a/.github/workflows/doit.yml b/.github/workflows/doit.yml index 104887a..1fe26d2 100644 --- a/.github/workflows/doit.yml +++ b/.github/workflows/doit.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - KAGGLE_KERNELS_PRIVATE: ${{ vars.KAGGLE_KERNELS_PRIVATE || 'no' }} + KAGGLE_KERNELS_PRIVATE: ${{ vars.KAGGLE_KERNELS_PRIVATE || 'no' }} # by default, do not include private kaggle kernels PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.11' }} permissions: @@ -82,7 +82,7 @@ jobs: run: | DISABLE_KAGGLE_ARCHIVING="${{ env.DISABLE_KAGGLE_ARCHIVING || vars.DISABLE_KAGGLE_ARCHIVING || secrets.DISABLE_KAGGLE_ARCHIVING }}" if [[ "${DISABLE_KAGGLE_ARCHIVING:-}" =~ ^(true|1|y|yes|ok)$ ]]; then - echo "Kaggle archiving is disabled" + echo "Kaggle kernels archiving is disabled" echo "archive_created=false" >> $GITHUB_ENV echo "- kernels.7z has not been created as requested" > $GITHUB_STEP_SUMMARY exit 0 @@ -189,9 +189,10 @@ jobs: run: | mkdir tmpgit EXIT_CODE=0 - git clone --depth 1 https://github.com/${{ env.DESTINATION_REPOSITORY_USERNAME }}/${{ env.DESTINATION_REPOSITORY_NAME }}.git tmpgit 2>&1 || { - EXIT_CODE=$? - echo "Error cloning repository" + git clone -q --sparse --depth 1 https://github.com/${{ env.DESTINATION_REPOSITORY_USERNAME }}/${{ env.DESTINATION_REPOSITORY_NAME }}.git tmpgit 2>&1 || { + if (grep --ignore-case -q "could not read Username"); then + EXIT_CODE=$? + fi } if [[ $EXIT_CODE -eq 128 ]]; then @@ -221,7 +222,7 @@ jobs: user-name: ${{ env.GIT_DESTINATION_REPOSITORY_USERNAME }} user-email: ${{ env.GIT_DESTINATION_REPOSITORY_USERNAME }}@users.noreply.github.com create-target-branch-if-needed: ${{ vars.DEPLOY_TO_REPOSITORY_CREATE_TARGET_BRANCH_IF_NEEDED || true }} - target-branch: ${{ vars.DEPLOY_TO_REPOSITORY_TARGET_BRANCH || 'main' }} + target-branch: ${{ env.DEPLOY_TO_REPOSITORY_TARGET_BRANCH || vars.DEPLOY_TO_REPOSITORY_TARGET_BRANCH || 'main' }} env: SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}