Skip to content

Update main.yml

Update main.yml #63

Workflow file for this run

on:
push:
workflow_dispatch:
inputs:
prerelease:
default: true
type: boolean
name: Build ISO
jobs:
build:
permissions:
contents: write
packages: write
repository-projects: write
runs-on: ubuntu-24.04
container:
image: archlinux
options: --privileged
steps:
- name: Trigger package build
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: forsenior/senior-os-repository
event-type: build-packages
- name: Checkout
uses: actions/checkout@v4
- name: Install archiso
run: pacman -Sy --noconfirm archiso
- name: Build archiso
run: |
mkarchiso -v siso/src/archlive/
mv out/archlinux** "out/senioros-`date +%Y-%m-%dT%H_%M`.iso"
- name: Upload ISO
uses: actions/upload-artifact@v4
with:
name: senioros-iso
path: out/
release:
needs: build
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H_%M')"
- name: Fetch ISO
uses: actions/download-artifact@v4
with:
name: senioros-iso
path: out/
- name: Release SeniorOS
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.date.outputs.date }}"
prerelease: ${{ github.event.inputs.prerelease || true }}
title: "SeniorOS ${{ github.event.repository.updated_at}}"
files: |
out/*.iso
prerelease:
needs: build
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- name: Fetch ISO
uses: actions/download-artifact@v4
with:
name: senioros-iso
path: out/
- name: Release SeniorOS latest PreRelease
uses: "marvinpinto/action-automatic-releases@latest"
if: ${{ github.event.inputs.prerelease || true }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: ${{ github.event.inputs.prerelease || true }}
title: "SeniorOS ${{ github.event.repository.updated_at}}"
files: |
out/*.iso