We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a4c60c commit 2e9aaf9Copy full SHA for 2e9aaf9
2 files changed
action.yml
@@ -51,6 +51,7 @@ runs:
51
env:
52
INPUT_DEPLOY_DIRECTORY: ${{ inputs.deploy-directory }}
53
INPUT_BASE_REF: ${{ inputs.base-ref }}
54
+ GITHUB_EVENT_BEFORE: ${{ github.event.before }}
55
run: bash ${{ github.action_path }}/scripts/detect-challenges.sh
56
57
- name: Sync challenges
scripts/detect-challenges.sh
@@ -12,6 +12,13 @@ if [ -z "$BASE_REF" ]; then
12
fi
13
14
15
+if [ -n "$BASE_REF" ]; then
16
+ if ! git cat-file -e "$BASE_REF" 2>/dev/null; then
17
+ echo "Base ref $BASE_REF not in shallow clone, fetching..."
18
+ git fetch --depth=1 origin "$BASE_REF" 2>/dev/null || BASE_REF=""
19
+ fi
20
+fi
21
+
22
if [ -z "$BASE_REF" ]; then
23
echo "No base ref available (initial push?) — syncing all challenges"
24
echo "should_sync=true" >> "$GITHUB_OUTPUT"
0 commit comments