2023-12-25 02:57:07 -05:00
|
|
|
name: Binary Cache
|
|
|
|
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
nix:
|
|
|
|
name: "Build"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: https://github.com/actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup-Nix
|
|
|
|
uses: https://github.com/cachix/install-nix-action@v24
|
2023-12-25 21:30:08 -05:00
|
|
|
with:
|
|
|
|
github_access_token: ${{ secrets.TOKEN_GH }}
|
2023-12-25 16:32:58 -05:00
|
|
|
|
|
|
|
- name: Install-nixci
|
|
|
|
uses: https://github.com/yaxitech/nix-install-pkgs-action@v3
|
2023-12-25 02:57:07 -05:00
|
|
|
with:
|
2023-12-25 21:30:08 -05:00
|
|
|
packages: "nixpkgs#nixci, dig"
|
2023-12-25 16:32:58 -05:00
|
|
|
|
|
|
|
- name: Setup-cachix
|
|
|
|
uses: https://github.com/cachix/cachix-action@v12
|
2023-12-25 02:57:07 -05:00
|
|
|
with:
|
|
|
|
name: archives
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
|
2023-12-25 21:30:08 -05:00
|
|
|
- name: Install SSH key
|
|
|
|
run: |
|
|
|
|
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
|
|
|
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
|
|
|
|
host='git.nelim.org'
|
|
|
|
hosts="$(dig +short "$host" | grep -v '\.$' | sed -z 's|\n|,|g')$host"
|
|
|
|
ssh-keyscan -H "$hosts" > ~/.ssh/known_hosts
|
|
|
|
|
2023-12-25 16:32:58 -05:00
|
|
|
- name: Build-configs
|
2023-12-25 02:57:07 -05:00
|
|
|
run: |
|
2023-12-25 16:32:58 -05:00
|
|
|
nix flake update
|
2023-12-25 02:57:07 -05:00
|
|
|
nixci
|