From 1e0c57899a109392931e4acd5095fb546d71e8d5 Mon Sep 17 00:00:00 2001 From: Elias Lundell <36220731+LogFlames@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:13:23 +0200 Subject: [PATCH] :construction_worker: feat: trigger github action on changed lockfile.json (#883) Co-authored-by: LogFlames --- README.md | 2 +- action.yml | 3 ++- template/action.yml | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3094ab5..6d448b32 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/action.yml b/action.yml index 20a28695..e62f160e 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/template/action.yml b/template/action.yml index 1a0790ae..747c006b 100644 --- a/template/action.yml +++ b/template/action.yml @@ -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 }}