commit
8ea65c3f21
7 changed files with 95 additions and 0 deletions
12
.forgejo/workflows/main.yaml
Normal file
12
.forgejo/workflows/main.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: nix-upstream-latest
|
||||||
|
steps:
|
||||||
|
- run: nix develop
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |-
|
||||||
|
for line in tags.txt; do
|
||||||
|
IFS=: read -r pkg tag <<< $line
|
||||||
|
skopeo copy --dst-creds="${{ secrets.FJ_USER }}:${{ secrets.FJ_PASS }}" docker-image://$(nix-build -A $pkg --no-out-link) docker://git.10110110.xyz/ci/$tag
|
||||||
|
done
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
result
|
||||||
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758791193,
|
||||||
|
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
|
||||||
|
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
|
||||||
|
"revCount": 810395,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.810395%2Brev-25e53aa156d47bad5082ff7618f5feb1f5e02d01/01998694-ad17-7fa8-8c3a-c8bc31d19657/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
45
flake.nix
Normal file
45
flake.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
description = "git.10110110.xyz forgejo actions";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
|
||||||
|
};
|
||||||
|
outputs =
|
||||||
|
{ self, ... }@inputs:
|
||||||
|
let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux" # 64-bit Intel/AMD Linux
|
||||||
|
];
|
||||||
|
|
||||||
|
forEachSupportedSystem =
|
||||||
|
f:
|
||||||
|
inputs.nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
nix-with-node = (import ./pkgs/nix-with-node.nix { inherit pkgs; });
|
||||||
|
}
|
||||||
|
);
|
||||||
|
devShells = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
skopeo
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
10
pkgs/nix-with-node.nix
Normal file
10
pkgs/nix-with-node.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
pkgs.dockerTools.buildLayeredImage {
|
||||||
|
name = "nix-with-node";
|
||||||
|
contents = with pkgs; [
|
||||||
|
nix
|
||||||
|
nodejs
|
||||||
|
bash
|
||||||
|
git
|
||||||
|
];
|
||||||
|
}
|
||||||
1
result
Symbolic link
1
result
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/mi761m6y1gg54xj0nb1k1h9x18qxvsw1-nix-with-node.tar.gz
|
||||||
1
tags.txt
Normal file
1
tags.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
nix-with-node:nix-ci
|
||||||
Loading…
Add table
Add a link
Reference in a new issue