summaryrefslogtreecommitdiffstats
path: root/.github/workflows/run-autogen.yml
blob: 1a97114ffd7fb64db66fdc50416e5eb6ac8ed8bd (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
39
40
41
42
43
44
45
46
47
name: Run autogen script

on:
    workflow_dispatch:
    schedule:
        - cron: "15 13 * * *"

jobs:
    run-autogen-script:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2
            - uses: rhysd/action-setup-vim@v1
              with:
                  neovim: true
                  version: v0.7.0

            - name: Clone dependencies
              run: |
                  mkdir -p ~/.local/share/nvim/site/pack/packer/start
                  git clone --depth 1 https://github.com/neovim/nvim-lspconfig ~/.local/share/nvim/site/pack/packer/start/nvim-lspconfig

            - name: Run autogen_metadata.sh script
              run: ./scripts/autogen_metadata.sh

            - name: Create Pull Request
              id: cpr
              uses: peter-evans/create-pull-request@v4
              with:
                  token: ${{ secrets.PAT }}
                  author: "William Botman <william+bot@redwill.se>"
                  committer: "William Botman <william+bot@redwill.se>"
                  add-paths: lua/mason/_generated
                  commit-message: run autogen_metadata.lua
                  branch: chore/autogen_metadata
                  branch-suffix: short-commit-hash
                  delete-branch: true
                  labels: automerge
                  title: run autogen_metadata.lua

            - name: Enable Pull Request Automerge
              if: steps.cpr.outputs.pull-request-operation == 'created'
              uses: peter-evans/enable-pull-request-automerge@v2
              with:
                  token: ${{ secrets.PAT }}
                  pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
                  merge-method: squash