nix/.forgejo/workflows/build-linode-img.yml

52 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-16 01:08:42 +01:00
name: build-linode-img
run-name: ${{ github.actor }} - build-linode-img
2023-12-16 01:10:16 +01:00
on:
2023-12-20 05:48:49 +01:00
schedule:
- cron: '0 4 1,15 * *'
# “At 02:00 on day-of-month 1 and 15.”
2023-12-16 01:10:16 +01:00
2023-12-16 01:08:42 +01:00
jobs:
build-linode-img:
runs-on: docker
container:
image: alpine:edge
steps:
- name: "Setup Runner"
run: |
apk update
apk add git nodejs nix --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
- uses: actions/checkout@v3
- name: "Directory Structure"
run: |
ls ${{ github.workspace }}/*
- name: "Runner: Node Info"
run: |
id
uname -a
hostname
cat /etc/os-release
- name: "Nix Version"
run: |
nix --version
- name: "Nix build"
run: |
echo "Running Nix Build"
nix --extra-experimental-features "nix-command flakes" \
2023-12-16 02:53:13 +01:00
build ${{ github.workspace }}/#imageConfigurations.nixos-linode-img
2023-12-16 02:34:33 +01:00
- name: "Results"
run: |
2023-12-16 01:08:42 +01:00
echo "Results:"
ls -lah result/*
- if: always()
run: rm -rf /.cache
- if: always()
2023-12-20 14:21:52 +01:00
run: rm -rf ${{ github.worksspace }}
- 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 14:36:51 +01:00
notification_title: '[ ${{ github.workflow }} ] Build Failed'
2023-12-20 14:23:18 +01:00
notification_message: 'Your build has failed. Check Forgejo.'
name: "Send Notification"