10000 minor #54274 Update `changed-translation-files` step with native git … · symfony/symfony@c9bce39 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9bce39

Browse files
minor #54274 Update changed-translation-files step with native git diff command (arifszn)
This PR was merged into the 5.4 branch. Discussion ---------- Update `changed-translation-files` step with native git diff command | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT ## Description The **Integration workflow** currently relies on the [marceloprado/has-changed-path action](https://github.com/MarceloPrado/has-changed-path) to detect changes in translation files. However, this action is still utilizing Node.js version 16. Consequently, warnings about the deprecation of Node.js 16 actions appear whenever the Integration workflow is executed. ![image](https://github.com/symfony/symfony/assets/45073703/8a2691ab-7352-4110-ade7-74d979d2277d) This pull request proposes the removal of the `marceloprado/has-changed-path` action. Instead, it leverages the native git diff command, accessible through actions/checkout. This approach ensures smoother integration and avoids reliance on deprecated Node.js versions. Also, this PR gives a name to that step. Commits ------- 96e1d42 Update `changed-translation-files` step with native git diff command
2 parents 56c563e + 96e1d42 commit c9bce39

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/integration-tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,14 @@ jobs:
198198
# sudo rm -rf .phpunit
199199
# [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit
200200

201-
- uses: marceloprado/has-changed-path@v1.0.1
201+
- name: Check for changes in translation files
202202
id: changed-translation-files
203-
with:
204-
paths: src/**/Resources/translations/*.xlf
203+
run: |
204+
if git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf'; then
205+
echo "{changed}={true}" >> $GITHUB_OUTPUT
206+
else
207+
echo "{changed}={false}" >> $GITHUB_OUTPUT
208+
fi
205209
206210
- name: Check Translation Status
207211
if: steps.changed-translation-files.outputs.changed == 'true'

0 commit comments

Comments
 (0)
0