Skip to content

Commit c3e5f20

Browse files
fetch main for comparison
1 parent 223d0aa commit c3e5f20

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/deploy-changed-samples.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
1818
with:
19-
# Fetch two to see changes in current commit
20-
fetch-depth: 2
19+
fetch-depth: 1
20+
21+
- name: Fetch main branch
22+
run: git fetch origin main:main # Fetch the main branch reference for comparison
2123

2224
- name: Identify changed samples
2325
run: |
2426
echo "Identifying changed samples..."
25-
CHANGED_SAMPLES=$(git diff --name-only HEAD origin/main | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq)
27+
CHANGED_SAMPLES=$(git diff --name-only HEAD main | grep '^samples/' | awk -F'/' '{print $1"/"$2}' | sort | uniq)
2628
2729
- name: Install defang
2830
shell: bash

0 commit comments

Comments
 (0)