gen_schemas #31502
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gen_schemas | |
on: | |
# 手動実行できるようにする | |
workflow_dispatch: | |
schedule: | |
# 1時間に1回実行する | |
- cron: '0 * * * *' | |
jobs: | |
gen_schamges: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/checkout@v2 | |
- name: Setup from neovim nightly | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: nightly | |
- name: Run docgen | |
run: | | |
git clone --depth 1 https://github.com/neovim/nvim-lspconfig | |
scripts/gen_schemas.sh | |
- name: Commit changes | |
env: | |
COMMIT_MSG: | | |
[gen_schemas] Update schemas | |
run: | | |
git config user.email "actions@github" | |
git config user.name "Github Actions" | |
git add schemas | |
# Only commit and push if we have changes | |
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF}) |