mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-12 18:43:15 -06:00
e5fc027d37
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 14 to 15. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v14...v15) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
name: Build NixOS (on demand)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
host:
|
|
description: 'host name to build'
|
|
required: true
|
|
default: 'othalan'
|
|
type: string
|
|
lockFile:
|
|
description: 'flake.lock file'
|
|
type: string
|
|
|
|
workflow_call:
|
|
inputs:
|
|
host:
|
|
description: 'host name to build'
|
|
required: true
|
|
default: 'othalan'
|
|
type: string
|
|
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# # The default disk size of these runners is ~14GB
|
|
# # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
|
|
# - name: Cleanup Disk Space
|
|
# run: |
|
|
# echo "Before removing files:"
|
|
# df -h
|
|
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
# sudo rm -rf /opt
|
|
# sudo rm -rf /usr/share/dotnet
|
|
# sudo rm -rf /usr/local/{lib/android,share/boost}
|
|
# sudo docker image prune --all --force
|
|
# echo "After removing files:"
|
|
# df -h
|
|
|
|
- name: Maximize build space
|
|
uses: AdityaGarg8/remove-unwanted-software@v3
|
|
with:
|
|
remove-android: 'true'
|
|
remove-dotnet: 'true'
|
|
remove-haskell: 'true'
|
|
remove-codeql: 'true'
|
|
remove-docker-images: 'true'
|
|
remove-large-packages: 'true'
|
|
remove-cached-tools: 'true'
|
|
remove-swapfile: 'true'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
run: |
|
|
echo "Free space:"
|
|
df -h
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: DeterminateSystems/nix-installer-action@main
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
|
|
|
- uses: cachix/cachix-action@v15
|
|
with:
|
|
name: daylin
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
|
|
- name: write lock file
|
|
if: "${{ inputs.lockFile != '' }}"
|
|
run: |
|
|
echo '${{ inputs.lockFile }}' > flake.lock
|
|
git diff
|
|
|
|
- name: Build
|
|
run: |
|
|
nix run . --accept-flake-config -- cache --host "${{ inputs.host }}" --flake .
|