Skip to content

Commit 9c624ff

Browse files
authored
fix: Identifying files for staging publish (#411) (#414)
1 parent 8ec28d0 commit 9c624ff

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
has_new_files_to_promote: ${{ steps.changed-files.outputs.all_changed_files_count != 0 }}
3737
steps:
3838
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+
with:
40+
fetch-depth: 0
3941

4042
# Initializes the PR comment
4143
# Edits existing or creates new comment
@@ -72,11 +74,9 @@ jobs:
7274
- name: Get newly added and changed files
7375
id: changed-files
7476
run: |
75-
ACMR_FILES=$(git diff --name-only --diff-filter=ACMR $GITHUB_BASE_REF...$GITHUB_HEAD_REF)
76-
77-
mapfile -t "PUBLISH_FILES" < <(echo "$ACMR_FILES" | grep \
78-
-e "^ingestion-data/staging/dataset-config/.*\.json$" \
79-
-e "^ingestion-data/staging/collections/.*\.json$"
77+
mapfile -t "PUBLISH_FILES" < <(git diff --name-only --diff-filter=ACMR origin/$GITHUB_BASE_REF...HEAD -- \
78+
'ingestion-data/staging/dataset-config/**.json' \
79+
'ingestion-data/staging/collections/**.json'
8080
)
8181
8282
echo "all_changed_files=${PUBLISH_FILES[*]}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)