forked from arminask/windows-arm-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 2.21 KB
/
update-homer.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Update Homer
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-homer:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Clone Homer repository
run: git clone https://github.com/bastienwirtz/homer.git homer-latest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies and build Homer
working-directory: ./homer-latest
run: |
pnpm install
pnpm build
- name: Remove old files/directories that will be replaced by the update
working-directory: ./
run: |
rm -rf resources
rm workbox-*
- name: Copy built Homer files to repository
run: |
rsync -av \
--exclude='logo.png' \
--exclude='assets/additional-page.yml.dist' \
--exclude='assets/config-demo.yml.dist' \
--exclude='assets/config.yml.dist' \
--exclude='assets/config.yml.dist.sample-sui' \
--exclude='assets/custom.css.sample' \
--exclude='assets/tools/sample2.png' \
--exclude='assets/tools/sample.png' \
--exclude='assets/' \
--exclude='assets/icons/' \
--exclude='assets/tools/' \
--exclude='assets/manifest.json' \
homer-latest/dist/ \
./
- name: Remove homer-latest directory from the working directory
run: rm -rf homer-latest
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Homer base update"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated update of Homer base
branch: homer-base-update
title: "Update Homer base"
body: "This pull request contains automated updates of Homer dashboard files."
labels: automated pr