feat: update ISO naming in build workflow for NethServer 8 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |