Skip to content

Commit

Permalink
Merge pull request #23 from maxisoft/dev
Browse files Browse the repository at this point in the history
feat: Implement case-insensitive check for private repositories
  • Loading branch information
maxisoft authored Jul 28, 2024
2 parents 971387a + cf47cec commit 4755bc7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/doit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand Down

0 comments on commit 4755bc7

Please sign in to comment.