-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (76 loc) · 2.96 KB
/
publish_iso.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
name: Generate ISO image
on:
schedule:
- cron: '0 0 */3 * *'
workflow_dispatch:
pull_request:
types: [opened, reopened]
jobs:
geniso:
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64, riscv64]
variant: [liveimage-desktop, liveimage-standard, tarball]
exclude:
- arch: riscv64
variant: liveimage-desktop
include:
- arch: x86_64
debarch: amd64
- arch: aarch64
debarch: arm64
- arch: riscv64
debarch: riscv64
runs-on: ubuntu-24.04
name: Generate ISO for ${{ matrix.variant }} - ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.arch }}
image: 'tonistiigi/binfmt:qemu-v8.1.5'
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y wget dosfstools arch-install-scripts sudo pacman-package-manager xorriso arch-install-scripts squashfs-tools systemd-container
- name: Build ISO for ${{ matrix.variant }} - ${{ matrix.arch }}
run: |
./gen.sh ${{ matrix.variant }} ${{ matrix.arch }}
- name: Check build Results
id: buildresult
run: |
ls results/ | grep -v .sha256
ls results/ | grep .sha256
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eweos-${{ matrix.arch }}-${{ matrix.variant }}
path: results/
compression-level: 0
- name: Install s3cmd
if: github.event_name != 'pull_request'
run: sudo apt -y install s3cmd
- name: Create s3cmd config
if: github.event_name != 'pull_request'
run: |
echo "[default]" >> .s3-cf.conf
echo "access_key = ${{ secrets.CF_IMG_S3_ACCESS_KEY }}" >> .s3-cf.conf
echo "secret_key = ${{ secrets.CF_IMG_S3_SECRET_KEY }}" >> .s3-cf.conf
echo "host_base = ${{ secrets.CF_IMG_S3_HOST }}" >> .s3-cf.conf
echo "host_bucket = ${{ secrets.CF_IMG_S3_HOST_BUCKET }}" >> .s3-cf.conf
echo "bucket_location = auto" >> .s3-cf.conf
echo "enable_multipart = False" >> .s3-cf.conf
echo "[default]" >> .s3-orc.conf
echo "access_key = ${{ secrets.ORC_IMG_S3_ACCESS_KEY }}" >> .s3-orc.conf
echo "secret_key = ${{ secrets.ORC_IMG_S3_SECRET_KEY }}" >> .s3-orc.conf
echo "host_base = ${{ secrets.ORC_IMG_S3_HOST }}" >> .s3-orc.conf
echo "host_bucket = ${{ secrets.ORC_IMG_S3_HOST_BUCKET }}" >> .s3-orc.conf
echo "bucket_location = auto" >> .s3-orc.conf
echo "enable_multipart = False" >> .s3-orc.conf
- name: Upload to Object Storage
if: github.event_name != 'pull_request'
run: |
s3cmd -c ./.s3-orc.conf put results/* s3://eweos-repo/eweos-images/
s3cmd -c ./.s3-cf.conf put results/* s3://ewe/eweos-images/