-
-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (36 loc) · 1.26 KB
/
advisories.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 advisories
on:
repository_dispatch:
types: [ changed ]
jobs:
update-advisories:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout ruby-advisory-db
uses: actions/checkout@v2
with:
repository: rubysec/ruby-advisory-db
path: _advisories
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
- name: Install dependencies
run: bundle install --jobs 4 --retry 3
- name: Generate advisories
run: bundle exec rake advisories:generate
- name: Get latest advisory commit
id: git-commit
working-directory: _advisories
run: |
echo "::set-output name=author::$(git show -s --format='%an <%ae>')"
echo "::set-output name=hash::$(git rev-parse --short HEAD)"
- name: Commit any updates
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Updated advisory posts against rubysec/ruby-advisory-db@${{ steps.git-commit.outputs.hash }}"
file_pattern: advisories/_posts/*.md
commit_user_name: RubySec CI
commit_user_email: [email protected]
commit_author: ${{ steps.git-commit.outputs.author }}