mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 10:13:14 -06:00
95 lines
2.3 KiB
YAML
95 lines
2.3 KiB
YAML
name: Build NixOS (Nightly)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
|
|
# concurrency:
|
|
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
|
# cancel-in-progress: true
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-minimal:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- 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'
|
|
|
|
- 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
|
|
run: |
|
|
git checkout -B flake-lock
|
|
nix flake update --commit-lock-file 2>> $GITHUB_STEP_SUMMARY
|
|
|
|
- name: Build
|
|
run: |
|
|
nix run . \
|
|
-- \
|
|
build --minimal \
|
|
--host "othalan" \
|
|
--flake . \
|
|
--verbose \
|
|
--debug \
|
|
-- \
|
|
--print-build-logs
|
|
|
|
- name: Commit Updates
|
|
run: git push --set-upstream origin flake-lock
|
|
|
|
build-full:
|
|
needs: build-minimal
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: flake-lock
|
|
|
|
# - 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'
|
|
|
|
- uses: DeterminateSystems/nix-installer-action@v12
|
|
with:
|
|
extra-conf: |
|
|
accept-flake-config = true
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
|
|
|
- uses: ./.github/actions/clean-disk
|
|
with:
|
|
purge-packages: 'true'
|
|
|
|
- name: Build
|
|
run: |
|
|
system_attr=$(nix run . -- output --host "othalan" --flake .)
|
|
nix run . \
|
|
-- \
|
|
build $system_attr \
|
|
--flake . \
|
|
--verbose \
|
|
--debug \
|
|
-- \
|
|
--print-build-logs
|