-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement to identify changed files
- Loading branch information
1 parent
f1a4c44
commit 1502fdd
Showing
1 changed file
with
3 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,23 +37,10 @@ jobs: | |
distribution: 'microsoft' | ||
java-version: '17' | ||
|
||
- name: Identify changed files | ||
id: files | ||
- name: Identify and Copy Changed .json and .xml Files | ||
run: | | ||
echo "Changed .xml and .json files:" | ||
git fetch origin main:main | ||
git diff --name-only main | grep -E "\.xml$|\.json$" | tee changed-files.txt | ||
if [ -s changed-files.txt ]; then | ||
echo "::set-output name=changed::true" | ||
else | ||
echo "::set-output name=changed::false" | ||
fi | ||
- name: Copy changed files to a specific folder | ||
run: | | ||
mkdir temp_folder | ||
cat changed_files.txt | xargs -I {} cp {} temp_folder/ | ||
mkdir -p temp_folder # Create a temp folder | ||
git diff --name-only origin/main...HEAD | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ | ||
- name: Firely.Terminal (GitHub Actions) | ||
uses: FirelyTeam/[email protected] | ||
|