Skip to content

Commit 60367a9

Browse files
Bump tj-actions/changed-files from 34.5.3 to 35.1.1 (#503)
* Bump tj-actions/changed-files from 34.5.3 to 35.1.1 Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 34.5.3 to 35.1.1. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/changed-files@v34.5.3...v35.1.1) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Improve license header check Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Frédéric Collonval <[email protected]>
1 parent 16a9f4a commit 60367a9

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.github/workflows/check-api-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
5353
- name: Get API changes
5454
id: api-changed
55-
uses: tj-actions/changed-files@v34.5.3
55+
uses: tj-actions/changed-files@v35.1.1
5656
with:
5757
base_sha: 'HEAD~1'
5858
sha: 'HEAD'

.github/workflows/license-header.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,32 @@ jobs:
2929
with:
3030
mode: fix
3131

32-
- name: Apply Changes
32+
- name: List files changed
33+
id: files-changed
3334
shell: bash -l {0}
3435
run: |
35-
git config user.name 'github-actions[bot]'
36-
git config user.email 'github-actions[bot]@users.noreply.github.com'
37-
git add *
38-
git commit --allow-empty -m "Automatic application of license header"
36+
set -ex
37+
export CHANGES=$(git status --porcelain | tee modified.log | wc -l)
38+
cat modified.log
39+
# Remove the log otherwise it will be committed
40+
rm modified.log
3941
40-
- name: Get modified files in the staging directory
41-
id: changed-files
42-
uses: tj-actions/[email protected]
43-
with:
44-
since_last_remote_commit: "true"
45-
sha: 'HEAD'
42+
echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT
4643
47-
- name: Push fixes
48-
if: steps.changed-files.outputs.any_changed == 'true'
44+
git diff
45+
46+
- name: Commit any changes
47+
if: steps.files-changed.outputs.N_CHANGES != '0'
4948
shell: bash -l {0}
5049
run: |
51-
echo "Changed files:"
52-
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
53-
echo " $file"
54-
done
50+
git config user.name "github-actions[bot]"
51+
git config user.email "github-actions[bot]@users.noreply.github.com"
52+
53+
git pull --no-tags
54+
55+
git add *
56+
git commit -m "Automatic application of license header"
57+
5558
git config push.default upstream
5659
git push
5760
env:

0 commit comments

Comments
 (0)