-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.99 KB
/
Copy pathbuild.yml
File metadata and controls
63 lines (51 loc) · 1.99 KB
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
name: build
on:
push:
workflow_dispatch:
schedule:
- cron: '0 1 * * 0'
env:
PROJECT_NAME: exordos-base
REPO_ENDPOINT_PUT: http://10.20.0.1:8082
jobs:
Build:
runs-on: self-hosted
if : ${{ github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build Exordos Core
run: |
set -eux
# Build in all image formats
export GEN_IMG_FORMAT=qcow2,zst,raw
exordos build $(pwd)
# Temporary upload step is done in the build script
VERSION="$(exordos --silent get-version .)"
# Upload the VM images
cd output
curl -X PUT --upload-file exordos-base.qcow2 \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/${VERSION}/exordos-base.qcow2
curl -X PUT --upload-file exordos-base.raw.zst \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/${VERSION}/exordos-base.raw.zst
curl -X PUT --upload-file exordos-base.raw \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/${VERSION}/exordos-base.raw
sha256sum exordos-base.qcow2 >> SHA256SUMS
sha256sum exordos-base.raw.zst >> SHA256SUMS
sha256sum exordos-base.raw >> SHA256SUMS
curl -X PUT --upload-file SHA256SUMS \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/${VERSION}/SHA256SUMS
if [[ $GITHUB_REF == refs/tags/* ]]; then
curl -X PUT --upload-file exordos-base.qcow2 \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/latest/exordos-base.qcow2
curl -X PUT --upload-file exordos-base.raw.zst \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/latest/exordos-base.raw.zst
curl -X PUT --upload-file exordos-base.raw \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/latest/exordos-base.raw
curl -X PUT --upload-file SHA256SUMS \
${REPO_ENDPOINT_PUT}/${PROJECT_NAME}/latest/SHA256SUMS
fi
cd -