aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-12-06 20:55:17 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-12-06 21:29:50 +0100
commit5684389a2707a43c50f706d3c63a46ecad4dc8c3 (patch)
treedd7465af7e3adc368010560f62578f878a49e1fb /.github/workflows
parentrust(highlights): fix highlighting of char_literal (diff)
downloadnvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar.gz
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar.bz2
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar.lz
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar.xz
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.tar.zst
nvim-treesitter-5684389a2707a43c50f706d3c63a46ecad4dc8c3.zip
ci: open PRs to update README
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update-readme.yml27
1 files changed, 15 insertions, 12 deletions
diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml
index 8d10198e7..706385f05 100644
--- a/.github/workflows/update-readme.yml
+++ b/.github/workflows/update-readme.yml
@@ -1,14 +1,16 @@
name: Check README parser info
-on: push
+on:
+ push:
+ branches:
+ - master
jobs:
update-readme:
name: Check README parser info
runs-on: ubuntu-latest
- if: github.ref != 'master'
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Prepare
env:
@@ -21,18 +23,19 @@ jobs:
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start
- # inspired by nvim-lspconfigs
- name: Check README
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- COMMIT_MSG: |
- [docgen] Update README.md
- skip-checks: true
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
- git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
./nvim.appimage --headless -c "luafile ./scripts/update-readme.lua" -c "q" || echo "Needs update"
git add README.md
- # 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})
+ git commit -m "Update README" || echo 'No commit necessary!'
+ git clean -xf
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v3
+ with:
+ commit-message: Update README
+ title: Update README
+ branch: update-readme-pr
+ base: ${{ github.head_ref }}