Skip to content

Commit edea7a9

Browse files
committed
Update GitHub action to use modern versions and credential auth
1 parent afc5ae9 commit edea7a9

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/advisories.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,24 @@ on:
77
jobs:
88
update-advisories:
99
runs-on: ubuntu-latest
10+
permissions:
11+
# Give the default GITHUB_TOKEN write permission to commit and push the
12+
# added or changed files to the repository.
13+
contents: write
1014
steps:
11-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v6
16+
with:
17+
persist-credentials: true
1218
- name: Checkout ruby-advisory-db
13-
uses: actions/checkout@v2
19+
uses: actions/checkout@v6
1420
with:
1521
repository: rubysec/ruby-advisory-db
1622
path: _advisories
1723
- name: Set up Ruby
1824
uses: ruby/setup-ruby@v1
1925
with:
2026
ruby-version: ruby
21-
- name: Install dependencies
22-
run: bundle install --jobs 4 --retry 3
27+
bundler-cache: true
2328
- name: Generate advisories
2429
run: bundle exec rake advisories:generate
2530
- name: Get latest advisory commit
@@ -29,7 +34,7 @@ jobs:
2934
echo "::set-output name=author::$(git show -s --format='%an <%ae>')"
3035
echo "::set-output name=hash::$(git rev-parse --short HEAD)"
3136
- name: Commit any updates
32-
uses: stefanzweifel/git-auto-commit-action@v4
37+
uses: stefanzweifel/git-auto-commit-action@v7
3338
with:
3439
commit_message: "Updated advisory posts against rubysec/ruby-advisory-db@${{ steps.git-commit.outputs.hash }}"
3540
file_pattern: advisories/_posts/*.md

0 commit comments

Comments
 (0)