Skip to content

feat: add git-conflict.nvim integration #56

feat: add git-conflict.nvim integration

feat: add git-conflict.nvim integration #56

Workflow file for this run

name: CI update NvChad types
on:
push:
branches:
- v2.5
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
update-nvchad-types:
runs-on: ubuntu-latest
steps:
- name: Checkout base46/v2.5
uses: actions/checkout@v4
with:
ref: v2.5
- name: Prepare
env:
NVIM_TAG: stable
run: |
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz
tar -zxf nvim-linux64.tar.gz
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
mkdir -p ~/.local/share/nvim/site/pack/base46/start
ln -s "$PWD" ~/.local/share/nvim/site/pack/base46/start
mkdir -p ~/.local/share/nvim/site/pack/ui/start
cd ~/.local/share/nvim/site/pack/ui/start
git clone https://github.com/NvChad/ui
- name: Update types
run: |
cd ~/.local/share/nvim/site/pack/ui/start/ui
output=$(nvim --headless -c '+luafile scripts/update-nvchad-types.lua' +qa 2>&1)
status=$?
if [ $status -ne 0 ] || echo "$output" | grep -q "Error"; then
echo "Neovim failed with status $status"
echo "Error output:"
echo "$output"
exit 1
fi
- name: Setup git credentials
run: |
cd ~/.local/share/nvim/site/pack/ui/start/ui
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git config --global credential.helper 'store --file=/tmp/git-credentials'
echo "https://${{ secrets.UI_PAT }}:@github.com/NvChad/ui.git" > /tmp/git-credentials
- name: Commit and push changes
run: |
cd ~/.local/share/nvim/site/pack/ui/start/ui
git add -A
if [[ -n "$(git status --porcelain)" ]]; then
git commit -m "chore(types): update NvChad types"
git push origin v3.0
else
echo "No changes to commit"
fi