mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
workflow: added a daily nightly build
This is a workflow that runs every day at 00:00 UTC and creates an ISO of the last commit at said time and pushes it to the Releases.
This commit is contained in:
parent
b1f45b90cd
commit
7d66d9b439
1 changed files with 62 additions and 0 deletions
62
.github/workflows/nightly.yml
vendored
Normal file
62
.github/workflows/nightly.yml
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
name: Nightly Build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
make \
|
||||
gcc-x86-64-linux-gnu \
|
||||
binutils-x86-64-linux-gnu \
|
||||
nasm \
|
||||
xorriso
|
||||
sudo ln -sf /usr/bin/x86_64-linux-gnu-gcc /usr/local/bin/x86_64-elf-gcc
|
||||
sudo ln -sf /usr/bin/x86_64-linux-gnu-ld /usr/local/bin/x86_64-elf-ld
|
||||
|
||||
- name: Build ISO
|
||||
run: make -j4
|
||||
|
||||
- name: Update nightly tag
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git tag -fa nightly -m "Nightly build ${GITHUB_SHA}" "${GITHUB_SHA}"
|
||||
git push origin refs/tags/nightly --force
|
||||
|
||||
- name: Prepare release metadata
|
||||
id: metadata
|
||||
run: |
|
||||
echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Publish nightly release asset
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: nightly
|
||||
name: Nightly Build (${{ steps.metadata.outputs.short_sha }})
|
||||
body: |
|
||||
This is an automated nightly build of BoredOS, this is not a final release and may be unstable.
|
||||
|
||||
Built from commit:
|
||||
- Full hash: `${{ github.sha }}`
|
||||
- Short hash: `${{ steps.metadata.outputs.short_sha }}`
|
||||
prerelease: true
|
||||
make_latest: false
|
||||
files: |
|
||||
boredos.iso
|
||||
overwrite_files: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Reference in a new issue