-
Notifications
You must be signed in to change notification settings - Fork 17
162 lines (137 loc) · 4.64 KB
/
refresh-repository.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: "Refresh Repository"
on:
workflow_dispatch:
jobs:
refresh-repository:
name: Build and Upload Packages to Repository
runs-on: ubuntu-latest
container:
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20231230R1
options: --platform ${{ matrix.config.platform }}
env:
PATH: "/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin"
ARCH: "${{ matrix.config.arch }}"
BOOTSTRAP: "${{ matrix.config.host }}"
TEST: "${{ matrix.config.test }}"
HOSTREPO: /hostrepo
strategy:
fail-fast: false
matrix:
config:
- {
arch: x86_64,
host: x86_64,
libc: glibc,
platform: linux/amd64,
test: 1,
}
steps:
- name: Prepare container
run: |
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
ls -la
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
xbps-install -Syu xbps
xbps-install -Syu
xbps-install -y tar curl unzip
- name: Make void pkgs directory
run: |
cd $HOME
mkdir void-pkgs
cd void-pkgs
- name: Clone Void-Packages and prepare
run: |
git clone --depth 1 https://github.com/void-linux/void-packages.git
ls -la
- name: Clone Hyprland-Void repo and prepare
run: |
git clone --depth 1 https://github.com/Makrennel/hyprland-void.git
cd hyprland-void
cat common/shlibs >> ../void-packages/common/shlibs
cp -r srcpkgs/* ../void-packages/srcpkgs
cd ..
- name: Create hostrepo and prepare masterdir
run: |
cd void-packages
ln -s "$(pwd)" /hostrepo &&
common/travis/set_mirror.sh &&
common/travis/prepare.sh &&
common/travis/fetch-xtools.sh
- name: Build tomlplusplus
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -h ~/hostdir pkg tomlplusplus
)
- name: Build hyprlang
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprlang
)
- name: Build hyprcursor
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprcursor
)
- name: Build hyprwayland-scanner
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprwayland-scanner
)
- name: Build hyprland
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprland
)
- name: Build sdbus-cpp
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg sdbus-cpp
)
- name: Build hyprland-protocols
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprland-protocols
)
- name: Build xdg-desktop-portal-hyprland
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg xdg-desktop-portal-hyprland
)
- name: Build hypridle
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hypridle
)
- name: Build hyprlock
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprlock
)
- name: Build hyprpaper
run: |
(
/hostrepo/xbps-src -j$(nproc) -s -H ~/hostdir pkg hyprpaper
)
- name: Retrieve private key
run: |
curl -H 'Authorization: token ${{ secrets.PEM_PAT }}' \
-H 'Accept: application/vnd.github.v3.raw' \
-O -L https://api.github.com/repos/Makrennel/hyprland-void-private-pem/contents/private.pem
- name: Sign repository
run: |
export XBPS_PASSPHRASE=${{ secrets.PRIVATE_PEM_PASSPHRASE }}
xbps-rindex --privkey ./private.pem --sign --signedby "hyprland-void-github-action" ~/hostdir/binpkgs
xbps-rindex --privkey ./private.pem --sign-pkg ~/hostdir/binpkgs/*.xbps
# - name: Checkout hyprland-void
# uses: actions/checkout@v4
- name: Refresh repository
run: |
cd ../hyprland-void
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin -d repository
git switch --orphan repository
cp ~/hostdir/binpkgs/* ./
git add .
git commit -m "Upload latest packages to repository"
git push origin repository