Skip to content

Commit

Permalink
minor #54274 Update changed-translation-files step with native git …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
nicolas-grekas committed Mar 13, 2024
2 parents 56c563e + 96e1d42 commit c9bce39
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/integration-tests.yml
Expand Up @@ -198,10 +198,14 @@ jobs:
# sudo rm -rf .phpunit
# [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit

- uses: marceloprado/has-changed-path@v1.0.1
- name: Check for changes in translation files
id: changed-translation-files
with:
paths: src/**/Resources/translations/*.xlf
run: |
if git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf'; then
echo "{changed}={true}" >> $GITHUB_OUTPUT
else
echo "{changed}={false}" >> $GITHUB_OUTPUT
fi
- name: Check Translation Status
if: steps.changed-translation-files.outputs.changed == 'true'
Expand Down

0 comments on commit c9bce39

Please sign in to comment.