summaryrefslogtreecommitdiffstats
path: root/.github/workflows/update-readme.yml
blob: 6708ad103f9bf8efd81ea7a48c1f63a07425c1f9 (plain) (blame)
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
35
36
37
38
name: Update README

on:
  push:
    branches:
      - master
  workflow_dispatch:

jobs:
  update-readme:
    name: Update README
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Prepare
        env:
          NVIM_TAG: stable
        run: |
          bash ./scripts/ci-install-ubuntu-latest.sh

      - name: Check README
        run: |
          git config user.email 'actions@github'
          git config user.name 'Github Actions'
          nvim -l scripts/update-readme.lua || echo 'Needs update'
          git add README.md
          git commit -m 'Update README' || echo 'No commit necessary!'
          git clean -xf

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5
        with:
          commit-message: Update README
          title: Update README
          branch: update-readme-pr
          base: ${{ github.head_ref }}
          draft: true