Skip to content

Fix yml syntax

Fix yml syntax #90

name: Build TriOS ISO (Dev branch)
on:
push:
branches: [ dev ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-trios:
name: Build and Package ISO
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up version file and variables
id: vars
shell: bash
run: |
_commit_hash=$(git rev-parse --short HEAD)
_container_name="trios-dev-${_commit_hash}"
echo "${_commit_hash}" > ./Trixie/config/includes.chroot/etc/trios/release
echo "commit_hash=${_commit_hash}" >> "$GITHUB_OUTPUT"
echo "container_name=${_container_name}" >> "$GITHUB_OUTPUT"
mkdir -p ./TriOs_Output
- name: Debug commit hash
run: |
echo "Commit hash is: ${{ steps.vars.outputs.commit_hash }}"
- name: Build Docker Image
working-directory: ./builder
run: |
docker build -t trios-builder .
- name: Run Docker Container (Privileged)
id: run_container
run: |
set -e
docker run -d \
--privileged \
--name "${{ steps.vars.outputs.container_name }}" \
-v "${{ github.workspace }}/Trixie:/TriOs" \
-v "${{ github.workspace }}/TriOs_Output:/TriOs_Output" \
trios-builder
docker logs -f "${{ steps.vars.outputs.container_name }}"
continue-on-error: true
- name: Stop Docker Container (always runs)
if: always()
run: |
docker stop "${{ steps.vars.outputs.container_name }}" 2>/dev/null || true
docker rm "${{ steps.vars.outputs.container_name }}" 2>/dev/null || true
- name: Verify ISO Output
if: success()
run: |
ls -lh ./TriOs_Output || true
- name: Upload ISO Artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: trios-dev-${{ steps.vars.outputs.commit_hash }}.iso
path: ./TriOs_Output/live-image-amd64.hybrid.iso