Skip to content

Commit 79bc66d

Browse files
authored
Merge pull request #126 from MekDrop/ci-fix-autobuild-3
CI: trying better detect changes after pack
2 parents 8a39c71 + 149a1a0 commit 79bc66d

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

.github/workflows/autobuild.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 2
2119

2220
- name: Set up Node.js
2321
uses: actions/setup-node@v4
@@ -30,22 +28,21 @@ jobs:
3028
- name: Run pack
3129
run: npm run pack
3230

33-
- name: Check for changes in dist/
31+
- name: Check changed files
3432
id: changed-files
35-
uses: tj-actions/changed-files@v44
36-
with:
37-
files: |
38-
dist/*.js
39-
dist/*.json
40-
41-
- name: List all changed files markdown files
42-
if: steps.changed-files.outputs.any_changed == 'true'
43-
env:
44-
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
33+
shell: bash
4534
run: |
46-
for file in ${ALL_CHANGED_FILES}; do
47-
echo "$file was changed"
48-
done
35+
CHANGED_FILES=$(git diff --name-only)
36+
37+
if [ -z "$CHANGED_FILES" ]; then
38+
echo "No uncommitted changes detected."
39+
echo "any_changed=false" >> $GITHUB_OUTPUT
40+
echo "all_changed_files=false" >> $GITHUB_OUTPUT
41+
else
42+
echo "Uncommitted changes detected: $CHANGED_FILES"
43+
echo "any_changed=true" >> $GITHUB_OUTPUT
44+
echo "all_changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
45+
fi
4946
5047
- name: Set current date as integer
5148
if: steps.changed-files.outputs.any_changed == 'true'

0 commit comments

Comments
 (0)