Update lockfile #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update lockfile | |
on: | |
schedule: | |
- cron: "30 6 * * *" | |
workflow_dispatch: | |
jobs: | |
update-lockfile: | |
name: Update lockfile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Prepare | |
env: | |
NVIM_TAG: nightly | |
run: | | |
wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux | |
mv jd-amd64-linux /tmp/jd | |
chmod +x /tmp/jd | |
bash scripts/ci-install-ubuntu-latest.sh | |
- name: Update parsers | |
env: | |
SKIP_LOCKFILE_UPDATE_FOR_LANGS: "" | |
run: | | |
cp lockfile.json /tmp/old_lockfile.json | |
nvim -l ./scripts/update-lockfile.lua | |
- name: Commit changes | |
run: | | |
git config user.name 'GitHub' | |
git config user.email '[email protected]' | |
git add lockfile.json | |
UPDATED_PARSERS=$(/tmp/jd -f merge /tmp/old_lockfile.json lockfile.json | jq -r 'keys | join(", ")') | |
echo "UPDATED_PARSERS=$UPDATED_PARSERS" >> $GITHUB_ENV | |
git commit -m "Update parsers: $UPDATED_PARSERS" || echo 'No commit necessary!' | |
git clean -xf | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
title: "Update lockfile.json: ${{ env.UPDATED_PARSERS }}" | |
branch: update-lockfile-pr | |
base: ${{ github.head_ref }} | |
draft: true |