diff options
Diffstat (limited to '.github/workflows/autogenerate.yml')
| -rw-r--r-- | .github/workflows/autogenerate.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/autogenerate.yml b/.github/workflows/autogenerate.yml new file mode 100644 index 00000000..3c596ca0 --- /dev/null +++ b/.github/workflows/autogenerate.yml @@ -0,0 +1,42 @@ +name: Autogenerate code + +on: + workflow_dispatch: + schedule: + - cron: "0 10 * * *" + +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: make autogenerate + run: make autogenerate + + - 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-lspconfig lua/mason-schemas + commit-message: "chore: update generated code" + branch: chore/autogenerate + branch-suffix: short-commit-hash + delete-branch: true + labels: automerge + title: "chore: update generated code" + + - 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 |
