File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -39,34 +39,24 @@ jobs:
3939 name : Should Run
4040 runs-on : ubuntu-latest
4141 outputs :
42- previous_version : ${{steps.versions.outputs.PREVIOUS_VAL}}
43- current_version : ${{steps.versions.outputs.CURRENT_VAL}}
42+ sec_agent_did_change : ${{ steps.check_sec_agent.outputs.divergent }}
4443 steps :
4544 - uses : actions/checkout@v4
4645 with :
4746 fetch-depth : 2
48- - uses : tj-actions/changed-files@v44
49- id : changed_files
47+ - name : Check Security Agent Changed
48+ id : check_sec_agent
49+ uses : jsumners-nr/gha-node-deps-divergent@643628fe0da51ec025e984c4644f17fd9f9e93f6
5050 with :
51- files : package.json
52- - name : Get dependency versions
53- id : versions
54- if : steps.changed_files.outputs.any_changed == 'true'
55- run : |
56- current_val=$(cat package.json | jq -r --arg pkg "@newrelic/security-agent" '.dependencies[$pkg]')
57- echo "current_val=${current_val}" >> $GITHUB_OUTPUT
58-
59- git checkout origin/${{github.base_ref || 'main'}}
60- previous_val=$(cat package.json | jq -r --arg pkg "@newrelic/security-agent" '.dependencies[$pkg]')
61- echo "previous_val=${previous_val}" >> $GITHUB_OUTPUT
62-
63- git checkout ${{github.sha}}
51+ base-sha : ${{ github.base_ref || 'main' }}
52+ current-sha : ${{ github.sha }}
53+ package-name : ' @newrelic/security-agent'
6454
6555 security-agent-tests :
6656 needs : [should_run]
6757 if : github.event_name == 'workflow_dispatch' ||
6858 github.event_name == 'schedule' ||
69- needs.should_run.outputs.previous_version != needs.should_run.outputs.current_version
59+ needs.should_run.outputs.sec_agent_did_change == 'true'
7060
7161 runs-on : ubuntu-latest
7262
You can’t perform that action at this time.
0 commit comments