summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-09-29 20:51:59 +0300
committerK900 <me@0upti.me>2023-09-29 21:53:26 +0300
commite6b1129f9d3c2010fba981307c72ad7d15717d3d (patch)
tree3b9665fb65d89186696bf042341989f4a2a72b70 /.github/workflows/main.yml
parent65ba7e6fb468fe67bff3751d205926bb05e0baff (diff)
feat: rewrite tarball generation to use proper nixos-install + nixos-enter
Supersedes #243.
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml22
1 files changed, 15 insertions, 7 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7baaef1..4ae011d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -50,6 +50,12 @@ jobs:
needs:
- prepare
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ config:
+ - modern
+ - legacy
+ - test
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -66,15 +72,17 @@ jobs:
echo ${{ needs.prepare.outputs.version }} > ./VERSION
echo $(git rev-parse HEAD) >> ./VERSION
- - name: Build installer ๐Ÿ› ๏ธ
+ - name: Build tarballs ๐Ÿ› ๏ธ
+ # We can't just nix run here because nix is not on root's PATH in the container
run: |
- nix build '.#nixosConfigurations.mysystem.config.system.build.installer'
+ nix build .#nixosConfigurations.${{ matrix.config }}.config.system.build.tarballBuilder
+ sudo ./result/bin/nixos-wsl-tarball-builder nixos-wsl.tar.gz
- - name: Upload installer ๐Ÿ“ค
+ - name: Upload tarball ๐Ÿ“ค
uses: actions/upload-artifact@v3
with:
- name: installer
- path: result/tarball/nixos-wsl-installer.tar.gz
+ name: tarball-${{ matrix.config }}
+ path: nixos-wsl.tar.gz
checks:
name: Flake Check ๐Ÿ“‹
@@ -117,10 +125,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- - name: Download installer ๐Ÿ“ฅ
+ - name: Download tarball ๐Ÿ“ฅ
uses: actions/download-artifact@v3
with:
- name: installer
+ name: tarball-test
- name: Execute test ๐Ÿงช
shell: pwsh