Skip to content

Commit

Permalink
switch to hercules ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Apr 10, 2023
1 parent 11286b4 commit cdb558f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
repository_dispatch:
workflow_dispatch:
push:
branches:
- main
#branches:
# - main
jobs:
images:
strategy:
Expand Down
9 changes: 2 additions & 7 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
cut_body_after = "" # don't include text from the PR body in the merge commit message
status = [
# garnix
"Evaluate flake.nix",
"package netboot-nixos-2211 [x86_64-linux]",
"package kexec-installer-nixos-2211 [x86_64-linux]",
"package kexec-installer-nixos-unstable [x86_64-linux]",
"check kexec-installer-unstable [x86_64-linux]",
"package netboot-nixos-unstable [x86_64-linux]"
"ci/hercules/onPush/default",
"ci/hercules/evaluation",
]
14 changes: 9 additions & 5 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ build_kexec_installer() {
}

main() {
declare -r tag=${1:-nixos-unstable} arch=${2:-x86_64-linux}
declare -r tag=$1
tmp="$(mktemp -d)"
trap 'rm -rf -- "$tmp"' EXIT
(
build_kexec_installer "$tag" "$arch" "$tmp"
build_netboot_image "$tag" "$arch" "$tmp"
for arch in x86_64-linux aarch64-linux; do
build_kexec_installer "$tag" "$arch" "$tmp"
build_netboot_image "$tag" "$arch" "$tmp"
done
) | readarray -t assets
for asset in "${assets[@]}"; do
pushd "$(dirname "$asset")"
Expand All @@ -40,9 +42,11 @@ main() {
done
assets+=("$TMP/sha256sums")

cat "${TMP}/sha256sums"

# Since we cannot atomically update a release, we delete the old one before
gh release delete "$tag" </dev/null || true
gh release create --title "$tag (build $(date +"%Y-%m-%d"))" "$tag" "${assets[@]}" </dev/null
#gh release delete "$tag" </dev/null || true
#gh release create --title "$tag (build $(date +"%Y-%m-%d"))" "$tag" "${assets[@]}" </dev/null
}

main "$@"
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
inputs.nixos-2211.url = "github:NixOS/nixpkgs/release-22.11";

nixConfig.extra-substituters = [
"https://cache.garnix.io"
"https://nix-community.cachix.org"
];
nixConfig.extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];

outputs = { self, nixos-unstable, nixos-2211 }: let
Expand Down

0 comments on commit cdb558f

Please sign in to comment.