-
Notifications
You must be signed in to change notification settings - Fork 379
59 lines (53 loc) · 1.89 KB
/
generate-cve-indexes.yml
File metadata and controls
59 lines (53 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: generate CVE indexes
on:
pull_request:
types: [opened, synchronize]
paths:
- "advocacy_docs/security/advisories/*.mdx"
- "advocacy_docs/security/assessments/*.mdx"
jobs:
generator:
if: github.event.sender.email != 'edb.slonik@enterprisedb.com'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
path: content
sparse-checkout: |
advocacy_docs
token: ${{ secrets.GH_SLONIK || github.token }}
- name: Checkout advisoryindex tool
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
path: tools
sparse-checkout: |
tools
- name: setup node
uses: actions/setup-node@v4
- name: install dependencies
run: npm --prefix ./tools/tools/automation/generators/advisoryindex ci
- name: regenerate security section index files
run: |
node ./tools/tools/automation/generators/advisoryindex/advisoryindex.js --root ./content/advocacy_docs/security
- name: check for modified files
id: changes
run: |
cd ./content
echo "files=`git ls-files --other --modified --exclude-standard | wc -l`" >> $GITHUB_OUTPUT
- name: commit modified files
if: steps.changes.outputs.files > 0
run: |
cd ./content
if [ -n "${{ secrets.GH_SLONIK }}" ]; then
git config user.name "Slonik"
git config user.email "edb.slonik@enterprisedb.com"
else
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
fi
git add .
git commit -m "update security section index files"
git push