diff --git a/.github/workflows/merge-upstream-and-update.yml b/.github/workflows/merge-upstream-and-update.yml index 28b2b612be..f662684722 100644 --- a/.github/workflows/merge-upstream-and-update.yml +++ b/.github/workflows/merge-upstream-and-update.yml @@ -32,8 +32,8 @@ jobs: git merge upstream/main --allow-unrelated-histories --no-commit --no-ff git reset HEAD lazy-lock.json - git checkout lazy-lock.json + git commit --no-edit - uses: rhysd/action-setup-vim@v1 if: steps.check_lockfile.outputs.files_exists == 'true' @@ -47,14 +47,16 @@ jobs: ./scripts/install.sh nvim --headless "+Lazy! update" +qa cp -pv "${HOME}/.config/nvim/lazy-lock.json" . + curl -L https://raw.githubusercontent.com/ayamir/nvimdots/main/lazy-lock.json -o lazy-lock.upstream.json + # refer to the upstream lazy-lock.json and merge common plugins with priority given to the upstream version. + jq -s '.[0] as $x | .[1] as $y | $x | to_entries | map(.key as $k | select($y | has($k)) | {($k): $y[$k]}) | add' lazy-lock.json lazy-lock.upstream.json > lazy-lock.tmp.json + mv lazy-lock.tmp.json lazy-lock.json + rm lazy-lock.upstream.json - - uses: peter-evans/create-pull-request@v6 + - uses: stefanzweifel/git-auto-commit-action@v5 if: steps.check_lockfile.outputs.files_exists == 'true' || steps.merge-upstream.outcome == 'success' with: - token: ${{ github.token }} - commit-message: "chore: auto merge upstream and update lazy-lock.json" - title: "chore: auto merge upstream and update lazy-lock.json" - branch: "merge_upstream_and_update_lazy_lock_action" - labels: | - dependencies - automated + commit_message: "chore: auto merge upstream and 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>"