-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.32 KB
/
dotfiles-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update Repository
on:
repository_dispatch:
types: [push-subtree]
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout nvim repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Clone dotfiles repo
run: |
git clone https://github.com/etherbiswas/dotfiles.git dotfiles
- name: Configure Git for dotfiles
run: |
cd dotfiles
git config user.name "GitHub Actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Pull latest .config/nvim from dotfiles
run: |
cd dotfiles
git pull origin hyprland
git subtree pull --prefix=.config/nvim https://github.com/etherbiswas/nvim.git lazy.nvim --squash
- name: Merge updates into nvim repo
run: |
rsync -av dotfiles/.config/nvim/ ./
rm -rf dotfiles
git add .
git commit -m "Updated from dotfiles" || echo "No changes to commit"
git push origin lazy.nvim