2024-07-11 23:36:44 -05:00
|
|
|
name: Build NixOS (Nightly)
|
2024-07-11 16:31:51 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: 0 0 * * *
|
|
|
|
|
|
|
|
# concurrency:
|
|
|
|
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
|
|
|
# cancel-in-progress: true
|
2024-07-11 23:33:26 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-07-11 16:31:51 -05:00
|
|
|
|
|
|
|
jobs:
|
2024-07-11 23:33:26 -05:00
|
|
|
build-minimal:
|
2024-07-11 16:31:51 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-07-12 09:55:23 -05:00
|
|
|
- run: git checkout -B flake-lock
|
2024-07-11 16:31:51 -05:00
|
|
|
|
2024-07-11 23:33:26 -05:00
|
|
|
- name: Setup Git Bot
|
|
|
|
run: |
|
|
|
|
git --version
|
|
|
|
git config user.name 'github-actions[bot]'
|
|
|
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
2024-07-11 16:31:51 -05:00
|
|
|
|
|
|
|
- uses: DeterminateSystems/nix-installer-action@v12
|
|
|
|
with:
|
|
|
|
extra-conf: |
|
|
|
|
accept-flake-config = true
|
|
|
|
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
|
|
|
|
|
|
|
- uses: cachix/cachix-action@v15
|
|
|
|
with:
|
|
|
|
name: daylin
|
|
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
|
|
|
|
|
|
- name: Update nix flake
|
2024-07-11 23:38:18 -05:00
|
|
|
run: |
|
2024-07-12 09:55:23 -05:00
|
|
|
printf '# Flake Lock\n\n```txt\n' >> $GITHUB_STEP_SUMMARY
|
2024-07-11 23:33:26 -05:00
|
|
|
nix flake update --commit-lock-file 2>> $GITHUB_STEP_SUMMARY
|
2024-07-12 09:55:23 -05:00
|
|
|
printf '```\n' >> $GITHUB_STEP_SUMMARY
|
2024-07-11 16:31:51 -05:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
nix run . \
|
|
|
|
-- \
|
|
|
|
build --minimal \
|
|
|
|
--host "othalan" \
|
|
|
|
--flake . \
|
|
|
|
--verbose \
|
|
|
|
--debug \
|
|
|
|
-- \
|
|
|
|
--print-build-logs
|
2024-07-11 23:33:26 -05:00
|
|
|
|
|
|
|
- name: Commit Updates
|
2024-07-12 00:16:33 -05:00
|
|
|
run: git push --set-upstream --force-with-lease origin flake-lock
|
2024-07-11 23:33:26 -05:00
|
|
|
|
|
|
|
build-full:
|
|
|
|
needs: build-minimal
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-07-12 09:55:23 -05:00
|
|
|
- run: git checkout -B flake-lock
|
|
|
|
|
2024-07-11 23:47:51 -05:00
|
|
|
# - name: Setup Git Bot
|
|
|
|
# run: |
|
|
|
|
# git --version
|
|
|
|
# git config user.name 'github-actions[bot]'
|
|
|
|
# git config user.email 'github-actions[bot]@users.noreply.github.com'
|
2024-07-11 23:33:26 -05:00
|
|
|
|
|
|
|
- uses: DeterminateSystems/nix-installer-action@v12
|
|
|
|
with:
|
|
|
|
extra-conf: |
|
|
|
|
accept-flake-config = true
|
|
|
|
|
2024-07-12 00:32:25 -05:00
|
|
|
# - uses: DeterminateSystems/magic-nix-cache-action@v7
|
2024-07-11 23:33:26 -05:00
|
|
|
|
|
|
|
- uses: ./.github/actions/clean-disk
|
|
|
|
with:
|
|
|
|
purge-packages: 'true'
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2024-07-12 00:06:11 -05:00
|
|
|
system_attr=$(nix run . -- output --host "othalan" --flake .)
|
2024-07-11 23:33:26 -05:00
|
|
|
nix run . \
|
|
|
|
-- \
|
2024-07-12 00:06:11 -05:00
|
|
|
build $system_attr \
|
2024-07-11 23:33:26 -05:00
|
|
|
--flake . \
|
|
|
|
--verbose \
|
|
|
|
--debug \
|
|
|
|
-- \
|
|
|
|
--print-build-logs
|