nix/.forgejo/workflows/build-desktop-iso.yml

50 lines
1.5 KiB
YAML
Raw Normal View History

2023-10-03 21:49:47 +09:00
name: build-desktop-iso
run-name: ${{ github.actor }} - build-desktop-iso
2023-12-16 09:08:42 +09:00
on:
schedule:
- cron: '0 0 1,15 * *'
# “At 00:00 on day-of-month 1 and 15.”
2023-10-04 08:21:31 +09:00
2023-10-02 19:08:16 +09:00
jobs:
2023-10-03 21:49:47 +09:00
build-desktop-iso:
2023-10-02 19:08:16 +09:00
runs-on: docker
2023-10-03 20:47:28 +09:00
container:
2023-10-03 21:07:16 +09:00
image: alpine:edge
2023-10-02 19:08:16 +09:00
steps:
2023-10-03 20:53:46 +09:00
- name: "Setup Runner"
run: |
apk update
2023-10-03 21:09:04 +09:00
apk add git nodejs nix --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
2023-10-03 11:36:50 +09:00
- uses: actions/checkout@v3
2023-10-03 14:11:21 +09:00
- name: "Directory Structure"
2023-10-03 11:47:57 +09:00
run: |
2023-10-03 12:11:56 +09:00
ls ${{ github.workspace }}/*
2023-10-03 19:42:17 +09:00
- name: "Runner: Node Info"
run: |
id
uname -a
hostname
2023-10-03 21:00:28 +09:00
cat /etc/os-release
2023-10-03 21:10:47 +09:00
- name: "Nix Version"
run: |
nix --version
2023-10-03 21:27:00 +09:00
- name: "Nix build"
run: |
echo "Running Nix Build"
2023-10-03 21:28:59 +09:00
nix --extra-experimental-features "nix-command flakes" \
2023-10-03 21:49:47 +09:00
build /workspace/albert/nix#imageConfigurations.nixos-iso-desktop
2023-10-03 21:27:00 +09:00
echo "Results:"
2023-10-03 21:49:47 +09:00
ls -lah result/iso/
2023-10-03 20:26:18 +09:00
2023-10-03 14:20:25 +09:00
- if: always()
2023-10-03 14:46:16 +09:00
run: rm -rf /.cache
- if: always()
2023-12-20 22:44:02 +09:00
run: rm -rf ${{ github.workspace }}
2023-12-20 22:21:52 +09:00
- if: failure()
uses: https://git.sysctl.io/actions/gotify-action@master
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
2023-12-20 22:40:58 +09:00
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Build Failed'
2023-12-20 22:23:18 +09:00
notification_message: 'Your build has failed. Check Forgejo.'
name: "Send Notification"