File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Generate Compatibility Report
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ repo_target :
7+ description : Generate the report for the local repo, the docs repo, or both.
8+ required : true
9+ type : choice
10+ default : both
11+ options :
12+ - local
13+ - docs
14+ - both
15+
16+ workflow_run :
17+ workflows : [ "Create Release" ]
18+ types :
19+ - completed
20+
21+ push :
22+ branches :
23+ - main
24+ paths :
25+ - ' test/versioned/**/package.json'
26+
27+ jobs :
28+ local :
29+ runs-on : ubuntu-latest
30+ if :
31+ github.event_name == 'push' ||
32+ (github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
33+ (github.event_name == 'workflow_dispatch' &&
34+ (inputs.repo_target == 'local' || inputs.repo_target == 'both'))
35+ steps :
36+ - uses : actions/checkout@v4
37+ - uses : jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b
38+ with :
39+ repo : newrelic/newrelic-node-versions
40+ platform : linux
41+ arch : amd64
42+ cache : enable
43+ - run : |
44+ nrversions -v -r . 2>status.log >./compatibility.md
45+
46+ # Upload generated artifacts for potential debugging purposes.
47+ - uses : actions/upload-artifact@v4
48+ with :
49+ name : status.log
50+ path : status.log
51+ - uses : actions/upload-artifact@v4
52+ with :
53+ name : compatibility.md
54+ path : compatibility.md
55+
56+ # Generate the new PR to update the doc in the repo.
57+ - run : |
58+ git config user.name $GITHUB_ACTOR
59+ git config user.email gh-actions-${GITHUB_ACTOR}@github.com
60+ - run : |
61+ rm -f status.log
62+ - uses : peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
63+ with :
64+ title : " docs: Updated compatibility report"
65+ commit-message : " docs: Updated compatibility report"
66+ branch : " compatibility-report/auto-update"
67+ delete-branch : true
68+ base : main
69+ labels : " documentation"
70+
You can’t perform that action at this time.
0 commit comments