Skip to content

Commit

Permalink
self hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
quinneden committed Jan 5, 2025
1 parent 80e358a commit c102d08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-and-release:
runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
id-token: "write"
contents: "read"
Expand All @@ -20,14 +20,10 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install -y git-crypt
base64 -d <<< ${{ secrets.GIT_CRYPT_KEY }} | git-crypt unlock -
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
github-token: '${{ github.token }}'
extra-conf: "extra-platforms = aarch64-linux"
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
Expand Down
11 changes: 6 additions & 5 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let
rootSize="$(cat $out/data/root_part_size)B"
jq -r ".package = \"https://cdn.qeden.systems/os/nixos-asahi-${pkgVersion}.zip\"
| .partitions.[1].size = \"$rootSize\"
| .name = \"NixOS ${version}\"" \
| .name = \"NixOS ${version} (nixos-asahi-${pkgVersion})\"" \
< ${./data/installer_data.json}
'';
in
Expand All @@ -38,17 +38,18 @@ stdenv.mkDerivation rec {
runHook preBuild
mkdir -p $out/data
7z x $src/nixos-asahi.img
7z x $src/nixos-asahi.img
7z x ESP.img -o'esp'
rm -rf esp/EFI/nixos/.extra-files
stat --printf '%s' root.img > $out/data/root_part_size
printf "${version}" > $out/data/version_tag
printf '${pkgVersion}' > $out/data/version_tag
printf '${toString builtins.currentTime}' > $out/data/epoch
zip -r $out/${pname}-${version}.zip esp root.img
zip -r $out/${pname}-${pkgVersion}.zip esp root.img
${writeInstallerData} > $out/data/${pname}-${version}.json
${writeInstallerData} > $out/data/${pname}-${pkgVersion}.json
runHook postBuild
'';
}

0 comments on commit c102d08

Please sign in to comment.