-
Notifications
You must be signed in to change notification settings - Fork 47
34 lines (31 loc) · 1.07 KB
/
update-plugins.yaml
File metadata and controls
34 lines (31 loc) · 1.07 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
name: Update plugins
on:
schedule:
- cron: '8 14 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
with:
ruby-version: 3.1
- name: Update plugins.json
run: ruby scripts/plugins.rb
- name: Commit files
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
else
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}"@users.noreply.github.com
fi
git add scripts/plugins.json
git commit -F scripts/message.txt && git push origin master || echo "No need to update"