Skip to content

syntax: regenerate syntax definitions #2

syntax: regenerate syntax definitions

syntax: regenerate syntax definitions #2

Workflow file for this run

# GitHub workflow configuration file: Completion source (re)generation
#
# Copyright (C) 2022 Lucas Ritzdorf, Luca Zeuch
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---
name: Generate Completion Sources
on:
pull_request:
paths:
- 'syntax/**'
- 'scripts/boilerplate.lua'
- 'scripts/gen_code_completion.py'
jobs:
generate:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER: github-actions
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup git
run: |
git config user.name $GIT_USER
git config user.email $GIT_EMAIL
- name: Checkout PR
run: gh pr checkout ${{ github.event.pull_request.number }}
- name: Generate Completion
run: make completion
- name: Commit changes
run: |
if [[ -n "$(git status -s lua/)" ]]; then
git commit lua/ -m "completion: regenerate sources"
fi
- name: Push changes
run: git push