-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.59 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
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@v4
- name: Download Rocky Linux ISO
run: |
ROCKY_VERSION=${GITHUB_REF#refs/tags/rocky-}
echo "ROCKY_VERSION=${GITHUB_REF#refs/tags/rocky-}" >> $GITHUB_ENV
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 -R "Rocky Linux" "NethServer 8 (Rocky Linux)" --cmdline "inst.ks=https://raw.githubusercontent.com/NethServer/ns8-rocky-iso/refs/heads/main/ks.cfg" rocky.iso ns8-rocky-9.5-x86_64.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 Linux ${{ env.ROCKY_VERSION }} for NethServer 8
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-rocky-9.5-x86_64.iso
asset_name: ns8-rocky-9.5-x86_64.iso
asset_content_type: application/octet-stream