init
Some checks failed
/ check (push) Failing after 1m56s

This commit is contained in:
iofq 2025-09-27 14:44:02 -05:00
commit bab0f30faa
7 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,15 @@
on: [push]
jobs:
check:
runs-on: nix-upstream-latest
steps:
- run: echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
- run: nix-env -i nodejs # bootstrap
- uses: actions/checkout@v4
- run: |-
nix develop --command bash -c '
for line in $(cat tags.txt); do
IFS=: read -r pkg tag <<< $line
skopeo copy --dest-creds="${{ secrets.FJ_USER }}:${{ secrets.FJ_PASS }}" docker-image://$(nix build .#$pkg --print-out-paths) docker://git.10110110.xyz/ci/$tag:latest
done
'

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
result

25
flake.lock generated Normal file
View 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
View 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
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
pkgs.dockerTools.buildLayeredImage {
name = "nix-with-node";
contents = with pkgs; [
nix
nodejs
bash
git
];
}

1
result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/r7ai8pbishhz8k6ca1qbg2kvia7vqcl3-nix-with-node.tar.gz

1
tags.txt Normal file
View file

@ -0,0 +1 @@
nix-with-node:nix-ci