File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1010 contents : write
1111 repository-projects : read
1212 jobs :
13+
1314 jira_task :
1415 name : Create Jira issue
1516 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ ---
2+ name : Update PURLs list for dependabot prs
3+
4+ on :
5+ pull_request
6+
7+ permissions :
8+ pull-requests : write
9+ contents : write
10+ repository-projects : read
11+ jobs :
12+
13+ update-purls :
14+ name : Update PURLs
15+ runs-on : ubuntu-latest
16+ if : github.actor == 'dependabot[bot]'
17+ steps :
18+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
19+ with :
20+ config : ${{ vars.PERMISSIONS_CONFIG }}
21+ - name : Checkout code
22+ uses : actions/checkout@v4.1.1
23+ with :
24+ ref : ${{ github.head_ref }}
25+ fetch-depth : 0
26+
27+ - name : Run Make Command
28+ run : |
29+ make gen-purls
30+
31+ - name : Set up Git config
32+ run : |
33+ git config --global user.name "github-actions[bot]"
34+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
35+
36+ - name : Commit updated purls.txt if changed
37+ run : |
38+ echo "Changes to purls.txt:"
39+ if git diff --exit-code purls.txt; then
40+ echo "No changes to purls.txt"
41+ else
42+ git add purls.txt
43+ git commit -m "chore: update purls.txt"
44+ git push origin "${{ github.head_ref }}"
45+ fi
You can’t perform that action at this time.
0 commit comments