Skip to content

Commit

Permalink
Build recoverykit-amd64 ISO and upload as CI artifact
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Jiroh Halili <[email protected]>
  • Loading branch information
ajhalili2006 committed Jan 2, 2025
1 parent 5c82d93 commit ebd3295
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/update-flakes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Nix
uses: cachix/install-nix-action@v14

- name: Setup Deterinate Nix
uses: DeterminateSystems/nix-installer-action@main
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
determinate: true

- name: Update flake
run: |
echo ::addgroup:
echo ::addgroup::Updating lockfile
nix flake update
echo ::endgroup
echo ::endgroup::
echo ::addgroup::Metadata
nix flake metadata
echo ::endgroup::
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "RecapTimeBot"
git config --global user.email "recaptimebot@gmail.com"
git add flake.lock
git commit -m "Update flake.lock" || echo "No changes to commit"
git push
build:
build-iso:
needs: [update-lockfile]
name: Build recovery ISO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Nix
uses: cachix/install-nix-action@v14

- name: Setup Deterinate Nix
uses: DeterminateSystems/nix-installer-action@main
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
determinate: true

- run: nix flake metadata

- run: |
echo working on it soon!
mkdir dist
echo ::addgroup::Building amd64 minimal ISO file
nix build .#nixosConfigurations.recoverykit-amd64.config.system.build.isoImage --verbose --show-trace
cp result/iso/*.iso ./out/ -rv
echo ::endgroup
- name: Upload as artifact
uses: actions/upload-artifact@v4
with:
name: nixos-recoverykit-iso
path: dist

0 comments on commit ebd3295

Please sign in to comment.