Skip to content

update lockfile

update lockfile #490

name: update lockfile
on:
# workflow_dispatch # manual update
# Scheduled update (07:30 everyday at UTC+8)
schedule: [{ cron: "30 23 * * *" }]
workflow_dispatch:
jobs:
update-lockfile:
if: github.repository_owner == 'CharlesChiuGit'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to count the commits
- uses: andstor/file-existence-action@v3
id: check_lockfile
with:
files: "lazy-lock.json"
- uses: rhysd/action-setup-vim@v1
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' }}
with:
neovim: true
version: nightly
- name: Run lockfile-autoupdate
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' }}
timeout-minutes: 5
run: |
./scripts/update_lockfile.sh
nvim --headless "+Lazy! update" +qa
cp -pv "${HOME}/.config/nvim/lazy-lock.json" .
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' }}
with:
commit_message: "chore(lockfile): auto update lazy-lock.json"
commit_user_name: "github-actions[bot]"
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
file_pattern: "lazy-lock.json"