Skip to content

Commit dc25179

Browse files
committed
New dependabot action
1 parent 15865d9 commit dc25179

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/dependabot.yml renamed to .github/workflows/dependabot-create-jira-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
contents: write
1111
repository-projects: read
1212
jobs:
13+
1314
jira_task:
1415
name: Create Jira issue
1516
runs-on: ubuntu-latest
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

0 commit comments

Comments
 (0)