Skip to content

Update plugins

Update plugins #1314

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@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1.292.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"