mirror of
https://codeberg.org/mart-w/nixos-x13s.git
synced 2024-12-11 15:36:13 +01:00
forgejo -> woodpecker
This commit is contained in:
parent
ebffb583a3
commit
e2ed1ccd08
|
@ -1,29 +0,0 @@
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
|
||||
jobs:
|
||||
kernel:
|
||||
runs-on: local/aarch64-linux
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: set home
|
||||
run: |
|
||||
echo "HOME=$PWD" >> "$GITHUB_ENV"
|
||||
|
||||
- name: build all
|
||||
run: |
|
||||
set -x
|
||||
TARGETS=$(nix eval .#packages.aarch64-linux --apply 'builtins.attrNames' --json | jq '. | map(".#" + .) | join(" ")' -r)
|
||||
OUTPUT=$(nix build --print-out-paths --keep-going $TARGETS)
|
||||
echo $OUTPUT
|
||||
echo "$OUTPUT" > build.out
|
||||
|
||||
- name: upload to cachix
|
||||
run: |
|
||||
cachix push nixos-x13s $(cat build.out)
|
||||
env:
|
||||
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_TOKEN_X13S }}'
|
25
.woodpecker/build.yaml
Normal file
25
.woodpecker/build.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
labels:
|
||||
type: local
|
||||
system: aarch64-linux
|
||||
|
||||
steps:
|
||||
- name: find-targets
|
||||
image: bash
|
||||
commands:
|
||||
- nix develop .#ci -c just -- find-targets
|
||||
|
||||
- name: build
|
||||
image: bash
|
||||
commands:
|
||||
- nix develop .#ci -c just -- build
|
||||
|
||||
- name: upload
|
||||
image: bash
|
||||
commands:
|
||||
- nix develop .#ci -c just -- push
|
||||
environment:
|
||||
CACHIX_AUTH_TOKEN:
|
||||
from_secret: CACHIX_AUTH_TOKEN
|
||||
|
||||
when:
|
||||
- event: push
|
13
flake.nix
13
flake.nix
|
@ -20,9 +20,16 @@
|
|||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devShells = {
|
||||
default = pkgs.mkShellNoCC { packages = [ pkgs.npins ]; };
|
||||
ci = pkgs.mkShellNoCC { packages = [ pkgs.cachix ]; };
|
||||
devShells = rec {
|
||||
default = pkgs.mkShellNoCC { packages = [ pkgs.npins ] ++ ci.nativeBuildInputs; };
|
||||
|
||||
ci = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
pkgs.cachix
|
||||
pkgs.jq
|
||||
pkgs.just
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
packages = {
|
||||
|
|
12
justfile
Normal file
12
justfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
all:
|
||||
just -l
|
||||
|
||||
find-targets:
|
||||
nix eval .#packages.aarch64-linux --apply 'builtins.attrNames' --json | jq '. | map(".#" + .) | join(" ")' -r > targets
|
||||
|
||||
build:
|
||||
nix build --print-out-paths --keep-going $(cat targets) > outputs
|
||||
cat outputs
|
||||
|
||||
push:
|
||||
cachix -- push nixos-x13s $(cat outputs)
|
Loading…
Reference in a new issue