-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.54 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
56
57
name: Build and Upload ISO
on:
push:
tags:
- 'rocky-*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download Rocky Linux ISO
run: |
ROCKY_VERSION=${GITHUB_REF#refs/tags/rocky-}
wget -O rocky.iso https://download.rockylinux.org/pub/rocky/${ROCKY_VERSION}/isos/x86_64/Rocky-${ROCKY_VERSION}-x86_64-minimal.iso
- name: Build container
run: |
buildah build -t ns8-boxbuilder .
- name: Create modified ISO
run: |
podman run --rm -it --privileged -v $(pwd):/root localhost/ns8-boxbuilder mkksiso --cmdline "inst.ks=https://raw.githubusercontent.com/NethServer/ns8-rocky-iso/refs/heads/main/ks.cfg" rocky.iso ns8.iso
# - name: Upload ISO artifact
# uses: actions/upload-artifact@v4
# with:
# name: ns8-iso
# path: ns8.iso
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Rocky ${{ env.ROCKY_VERSION }}
draft: false
prerelease: false
- name: Upload ISO to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ns8.iso
asset_name: ns8.iso
asset_content_type: application/octet-stream