Skip to content

update lockfile

update lockfile #231

Workflow file for this run

name: update lockfile
on:
# Scheduled update (each day)
schedule: [{ cron: "30 01 * * *" }]
workflow_dispatch:
jobs:
update-lockfile:
if: github.repository_owner == 'konosubakonoakua'
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@v2
id: check_lockfile
with:
files: "lazy-lock.json"
- name: Run count-new-commits
run: |
echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' --perl-regexp --author='^((?!github-actions).*)$' | wc -l)" >> "$GITHUB_ENV"
- uses: rhysd/action-setup-vim@v1
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' && env.NEW_COMMIT_COUNT > 0 }}
with:
version: v0.10.0
neovim: true
- name: Run lockfile-autoupdate
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' && env.NEW_COMMIT_COUNT > 0 }}
timeout-minutes: 10
run: |
./scripts/install.sh
export PLATFORM_GITHUB_ACTION=1
echo "################################"
pwd
ls -all
echo "################################"
nvim -u NONE --headless "+e .lazy.lua" "+trust" "+qa"
nvim -u NONE --headless "+e .nvim.lua" "+trust" "+qa"
echo "################################"
nvim --headless "+Lazy! update" "+qa"
echo "################################"
pwd
echo "################################"
cp -pv "${HOME}/.config/nvim/lazy-lock.json" .
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.check_lockfile.outputs.files_exists == 'true' && env.NEW_COMMIT_COUNT > 0 }}
with:
commit_message: "chore: update lazy-lock"
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"