Skip to content

Commit

Permalink
actions: add aarch64-linux remote builder
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 20, 2023
1 parent f935b09 commit e61a179
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/update-flakes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Tailscale
uses: tailscale/github-actions@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Set default git branch (to reduce log spam)
run: git config --global init.defaultBranch master
- uses: cachix/cachix-action@v12
Expand All @@ -40,6 +46,8 @@ jobs:
nix build --print-build-logs '.#nixosConfigurations.miku-nixos.config.system.build.toplevel'
nix build --print-build-logs '.#nixosConfigurations.mirai-vps.config.system.build.toplevel'
nix build --print-build-logs '.#nixosConfigurations.sankyuu-nixos.config.system.build.toplevel'
- name: 'Build NixOS configs for: zatsune-nixos'
run: nix build --print-build-logs --builders 'ssh://zatsune-nixos-uk aarch64-linux' '.#nixosConfigurations.zatsune-nixos.config.system.build.toplevel'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
Expand Down
1 change: 1 addition & 0 deletions actions/constants.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
maximize-build-space = "easimon/maximize-build-space@v7";
create-pull-request = "peter-evans/create-pull-request@v5";
command-output = "mathiasvr/[email protected]";
tailscale = "tailscale/github-actions@v2";
};
ubuntu.runs-on = "ubuntu-latest";
macos.runs-on = "macos-13";
Expand Down
9 changes: 9 additions & 0 deletions actions/steps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,13 @@ with constants;
sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
'';
};
setupTailscale = {
name = "Tailscale";
uses = actions.tailscale;
"with" = {
oauth-client-id = "\${{ secrets.TS_OAUTH_CLIENT_ID }}";
oauth-secret = "\${{ secrets.TS_OAUTH_SECRET }}";
tags = "tag:ci";
};
};
}
9 changes: 5 additions & 4 deletions actions/update-flakes.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
let
steps = import ./steps.nix;
constants = import ./constants.nix;
first = list: builtins.elemAt list 0;
in
with constants;
{
Expand All @@ -17,14 +16,16 @@ with constants;
maximimizeBuildSpaceStep
checkoutStep
(installNixActionStep { })
setupTailscale
setDefaultGitBranchStep
cachixActionStep
# (buildNixOSConfigurations { hostnames = [ (first nixos.hostnames) ]; extraNixFlags = [ "-o /tmp/nixos_old" ]; })
updateFlakeLockStep
(buildHomeManagerConfigurations { })
(buildNixOSConfigurations { })
# (buildNixOSConfigurations { hostnames = [ (first nixos.hostnames) ]; extraNixFlags = [ "-o /tmp/nixos_new" ]; })
# (diffNixOutputs "NixOS" "/tmp/nixos_old" "/tmp/nixos_new")
(buildNixOSConfigurations {
hostnames = [ "zatsune-nixos" ];
extraNixFlags = [ "--builders 'ssh://zatsune-nixos-uk aarch64-linux'" ];
})
(createPullRequestStep [ ])
];
};
Expand Down

0 comments on commit e61a179

Please sign in to comment.