This will prevent the CI from building the same packages twice when a build gets triggered while there are other ongoing builds.
38 lines
1,000 B
YAML
38 lines
1,000 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
jobs:
|
|
CI:
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: CI
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: "Install Nix"
|
|
uses: cachix/install-nix-action@v17
|
|
- name: "Set Up Binary Cache"
|
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
|
uses: cachix/cachix-action@v10
|
|
with:
|
|
name: t2linux
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
pushFilter: "x86_64-linux.iso$"
|
|
- name: Build
|
|
run: |
|
|
for iso in $(nix flake show --json | nix run nixpkgs#jq -- -r keys[]); do
|
|
nix build .#$iso
|
|
split -d result/iso/*.iso -b 1G $iso.iso-part-
|
|
rm result
|
|
done
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
|
|
with:
|
|
files: "*.iso-part-*"
|