Skip to content

Commit

Permalink
feat: add GitHub Actions workflow for building and uploading modified…
Browse files Browse the repository at this point in the history
… Rocky Linux ISO
  • Loading branch information
tommaso-ascani committed Jan 28, 2025
1 parent 0b2ee49 commit 7765808
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Upload ISO

on:
push:
tags:
- 'rocky-*'

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

0 comments on commit 7765808

Please sign in to comment.