-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
133 lines (121 loc) · 3.98 KB
/
deb-packaging.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
name: .deb packaging
on:
workflow_dispatch:
jobs:
build_job:
# The host should always be linux
runs-on: ubuntu-latest
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# Run steps on a matrix of 3 arch/distro combinations
strategy:
matrix:
include:
- arch: arm32v7
distro: ubuntu16.04
- arch: arm32v7
distro: ubuntu18.04
- arch: arm32v7
distro: ubuntu22.04
- arch: arm32v7
distro: ubuntu23.04
- arch: arm32v7
distro: ubuntu23.10
- arch: arm32v7
distro: bullseye
- arch: arm32v7
distro: bookworm
- arch: aarch64
distro: ubuntu16.04
- arch: aarch64
distro: ubuntu18.04
- arch: aarch64
distro: ubuntu20.04
- arch: aarch64
distro: ubuntu22.04
- arch: aarch64
distro: ubuntu23.04
- arch: aarch64
distro: ubuntu23.10
- arch: aarch64
distro: buster
- arch: aarch64
distro: bullseye
- arch: aarch64
distro: bookworm
- arch: amd64
distro: buster
- arch: i386
distro: buster
- arch: amd64
distro: bullseye
- arch: amd64
distro: bookworm
- arch: i386
distro: bullseye
- arch: i386
distro: bookworm
- arch: amd64
distro: ubuntu16.04
- arch: i386
distro: ubuntu16.04
- arch: amd64
distro: ubuntu18.04
- arch: i386
distro: ubuntu18.04
- arch: amd64
distro: ubuntu20.04
- arch: amd64
distro: ubuntu22.04
- arch: amd64
distro: ubuntu23.04
- arch: amd64
distro: ubuntu23.10
steps:
- uses: actions/[email protected]
- uses: allinurl/run-on-arch-action@master
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
# The shell to run commands with in the container
shell: /bin/bash
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye|bookworm)
apt-get update && apt-get install -y ca-certificates wget curl lsb-release && apt-get clean all
;;
esac
# Produce a binary artifact and place it in the mounted volume
run: |
ls -lath "/artifacts"
curl -O https://deb.goaccess.io/provision/provision.sh
chmod +x ./provision.sh
./provision.sh
echo "Success!!"
- name: Show the artifact
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
pwd
ls -lath "${PWD}/artifacts"
- name: 'Upload deb package'
uses: actions/upload-artifact@v3
with:
name: deb-package
path: 'artifacts/*.deb'
retention-days: 1