Skip to content

Commit

Permalink
simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Feb 29, 2024
1 parent df61662 commit a4c58da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .ci/github/number_of_files_changed_in_root.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

for file in $(cat -)
do
dirname $file;
done | sort | uniq | grep '^\.$' | wc -l)
11 changes: 5 additions & 6 deletions .github/workflows/archive-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ jobs:

- id: number-of-changed-files
run: |
echo "no_of_changed_files_in_root=$(for file in $(bash .ci/github/files_between_commits.sh $GITHUB_REF $GITHUB_SHA)
do
dirname $file;
done | sort | uniq | grep '^\.$' | wc -l)" >> $GITHUB_OUTPUT
echo "NO_OF_FILES_CHANGED_IN_ROOT=$(.ci/github/files_between_commits.sh $GITHUB_REF $GITHUB_SHA | .ci/github/number_of_files_changed_in_root.sh)" >> $GITHUB_ENV
- run: |
git archive -o archive.tar $GITHUB_SHA && sh .ci/github/validate_archive.sh archive.tar
- run: echo $NO_OF_FILES_CHANGED_IN_ROOT

# - run: |
# git archive -o archive.tar $GITHUB_SHA && sh .ci/github/validate_archive.sh archive.tar
# if: ${{ steps.number-of-changed-files.outputs.no_of_changed_files_in_root > 0 }}

0 comments on commit a4c58da

Please sign in to comment.