-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.03 KB
/
update_security_md.yml
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
name: Update SECURITY.md
on:
release:
types: [created]
jobs:
update-security:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Get current version
id: get_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Update SECURITY.md
run: node .github/scripts/update-security.js ${{ steps.get_version.outputs.version }}
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add SECURITY.md
git commit -m "Update SECURITY.md for version ${{ steps.get_version.outputs.version }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}