Skip to content

Commit

Permalink
👷 feat: trigger github action on changed lockfile.json (#883)
Browse files Browse the repository at this point in the history
Co-authored-by: LogFlames <[email protected]>
  • Loading branch information
LogFlames and LogFlames authored Sep 18, 2024
1 parent 1287d48 commit 1e0c578
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
include-maven-plugins: true

```
If a pom.xml file is changed, this action will add a commit with the updated lockfile to the pull request.
If a pom.xml or lockfile.json file is changed, this action will add a commit with the updated lockfile to the pull request.
Otherwise, it will validate the lockfile and fail if the lockfile is incorrect.
A lockfile is incorrect if any dependency has changed since the lockfile was generated. This includes versions and checksums.

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ runs:
shell: bash


- name: Get all changed pom.xml file(s)
- name: Get all changed pom.xml and lockfile.json file(s)
id: changed-files
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
with:
files: |
**/pom.xml
**/lockfile.json
**/${{ inputs.workflow-filename}}
- name: print all changed files
run: echo all changed files are ${{ steps.changed-files.outputs.all_changed_files }}
Expand Down
3 changes: 2 additions & 1 deletion template/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ runs:
shell: bash


- name: Get all changed pom.xml file(s)
- name: Get all changed pom.xml and lockfile.json file(s)
id: changed-files
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
with:
files: |
**/pom.xml
**/lockfile.json
**/${{ inputs.workflow-filename}}
- name: print all changed files
run: echo all changed files are ${{ steps.changed-files.outputs.all_changed_files }}
Expand Down

0 comments on commit 1e0c578

Please sign in to comment.