-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.37 KB
/
build.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
---
name: Build and publish
# yamllint disable-line rule:truthy
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install distrobuilder
run: |
sudo apt update
sudo apt install -y debootstrap rsync gpg squashfs-tools git make
git clone https://github.com/lxc/distrobuilder.git
cd distrobuilder
make
sudo mv $HOME/go/bin/distrobuilder /usr/local/bin/
sudo chmod +x /usr/local/bin/distrobuilder
- name: Build
run: |
sudo /usr/local/bin/distrobuilder build-lxc almalinux.yaml
- name: Rename artifact
run: |
mv rootfs.tar.xz itsm-ng-${{ github.ref_name }}.tar.xz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: itsm-ng-${{ github.ref_name }}.tar.xz
path: itsm-ng-${{ github.ref_name }}.tar.xz
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: itsm-ng-${{ github.ref_name }}.tar.xz
body: "New release is available"
name: LXC Release ${{ github.ref_name }}
draft: true
generate_release_notes: true