-
Notifications
You must be signed in to change notification settings - Fork 5
151 lines (123 loc) · 5.19 KB
/
ci.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
name: GitHub CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "59 15 * * *"
workflow_dispatch:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
build-trixie:
runs-on: ubuntu-latest
container: docker.io/library/debian:trixie-slim
name: Build Trixie
steps:
- uses: actions/checkout@v4
- name: Update Lingmo repo
run: |
apt-get update -y && apt-get upgrade -y && apt-get install -y apt-transport-https ca-certificates
echo "deb [trusted=yes] https://packages-lingmo.simplelinux.cn.eu.org/lingmo-archive/rolling/polaris polaris main contrib non-free" >> /etc/apt/sources.list.d/lingmo-rolling.list
apt-get update
- name: Update Apt and Install packages
run: |
apt-get update -y && apt-get upgrade -y
apt-get install -y sudo equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ --no-install-recommends
- name: Install PowerShell
run: |
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.3/powershell_7.4.3-1.deb_amd64.deb -o powershell.deb
apt-get install -y ./powershell.deb
rm powershell.deb
- name: Build Lingmo
run: |
git config --global http.sslVerify false
git config --global advice.detachedHead false
pwsh ./build.ps1
- uses: actions/upload-artifact@v4
with:
name: Lingmo Artifacts trixie
path: BuildArtifacts
compression-level: 9 # maximum compression
build-hydrogen:
runs-on: ubuntu-latest
container: ghcr.io/lingmoos-testing/lingmo:hydrogen-slim
name: Build Hydrogen
steps:
- uses: actions/checkout@v4
- name: Update Lingmo repo
run: |
apt-get update -y && apt-get upgrade -y && apt-get install -y apt-transport-https ca-certificates
echo "deb [trusted=yes] https://packages.lingmo.org/packages hydrogen main contrib non-free non-free-firmware" > /etc/apt/sources.list
apt-get update
- name: Update Apt and Install packages
run: |
apt-get update -y && apt-get upgrade -y
apt-get install -y sudo equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ --no-install-recommends
- name: Install PowerShell
run: |
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.3/powershell_7.4.3-1.deb_amd64.deb -o powershell.deb
apt-get install -y ./powershell.deb
rm powershell.deb
- name: Build Lingmo
run: |
git config --global http.sslVerify false
git config --global advice.detachedHead false
pwsh ./build.ps1
- uses: actions/upload-artifact@v4
with:
name: Lingmo Artifacts hydrogen
path: BuildArtifacts
compression-level: 9 # maximum compression
# upload:
# needs: build
# runs-on: ubuntu-latest
# name: Update to repo
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# # Destination path. Supports basic tilde expansion.
# # Optional. Default is $GITHUB_WORKSPACE
# path: ./zips
# # The repository owner and the repository name joined together by "/".
# # If github-token is specified, this is the repository that artifacts will be downloaded from.
# # Optional. Default is ${{ github.repository }}
# repository: ${{ github.repository }}
# # The id of the workflow run where the desired download artifact was uploaded from.
# # If github-token is specified, this is the run that artifacts will be downloaded from.
# # Optional. Default is ${{ github.run_id }}
# run-id: ${{ github.run_id }}
# - name: Prepare envs
# run: |
# sudo apt update && sudo apt install reprepro gnupg
# echo "${{ secrets.GPG_SIGN_KEY }}" >> key.key
# gpg --import key.key
# - name: Clone repo
# run: |
# git clone https://github.com/LingmoOS-Testing/lingmo-rolling-mirror.git pkg_site
# DEB_FILE_DIR="$(pwd)/zips"
# rm -rf pkg_site/devrepo/*
# cd pkg_site/helpers
# bash init_repo.sh
# git checkout --orphan latest_branch
# DEB_FILES=$(find $DEB_FILE_DIR -type f -name '*.deb')
# for debfile in $DEB_FILES; do
# bash add_deb.sh "$debfile"
# done
# cd ..
# git config --global user.email "[email protected]"
# git config --global user.name "Lingmo Automation Packer"
# git add . && git commit -m "Update Packages By Actions $(date)"
# git branch -D master
# git branch -m master
# - name: Push changes
# uses: ad-m/github-push-action@9870d48124da805820c70ebc6ba563c715551019
# with:
# github_token: ${{ secrets.API_GITHUB_TOKEN }}
# repository: "LingmoOS-Testing/lingmo-rolling-mirror"
# directory: "./pkg_site"
# branch: 'master'
# force: true