Remove Pim's blog here
All checks were successful
/ atticd (push) Successful in 57s
/ forgejo-nix-action (push) Successful in 2m3s

This commit is contained in:
Pim Kunis 2024-04-30 22:50:01 +02:00
parent 3b47eef1a4
commit 5d86e1d7a1
4 changed files with 1 additions and 133 deletions

View file

@ -1,24 +0,0 @@
on: [ push ]
jobs:
blog-pim:
runs-on: docker
container:
image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962
steps:
- name: Clone repository
run: git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git src
- name: Setup Nix cache
run: |
/bin/attic login local ${{ vars.ATTIC_URL }} ${{ secrets.ATTIC_TOKEN }}
/bin/attic use ${{ vars.ATTIC_CACHE }}
- name: Build image
run: nix build --out-link image ./src#packages.x86_64-linux.blog-pim
- name: Push image to Nix cache
run: /bin/attic push ${{ vars.ATTIC_CACHE }} image
- name: Log into container registry
run: /bin/skopeo login --tls-verify --username ${{ vars.RUNNER_USER }} --password ${{ secrets.RUNNER_TOKEN }} ${GITHUB_SERVER_URL}
- name: Push image to container registry
run: |
/bin/skopeo --insecure-policy copy docker-archive:image docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY_OWNER}/blog-pim:latest
gitrev=$(git --git-dir src/.git --work-tree src rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:image docker://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY_OWNER}/blog-pim:$gitrev

View file

@ -1,47 +0,0 @@
{ nixpkgs, flutils, blog-pim, nginx, ... }: flutils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nginxPort = "80";
nginxConf = pkgs.writeText "nginx.conf" ''
user nobody nobody;
daemon off;
error_log /dev/stdout info;
pid /dev/null;
events {}
http {
access_log /dev/stdout;
include ${nginx.outPath}/conf/mime.types;
server {
listen ${nginxPort};
index index.html;
location / {
root ${blog-pim.packages.${system}.static-website};
}
}
}
'';
in
{
packages.blog-pim = pkgs.dockerTools.buildLayeredImage {
name = "blog-pim";
tag = "latest";
contents = [
pkgs.fakeNss
pkgs.nginx
];
extraCommands = ''
mkdir -p tmp/nginx_client_body
mkdir -p var/log/nginx
'';
config = {
Cmd = [ "nginx" "-c" nginxConf ];
ExposedPorts = {
"${nginxPort}/tcp" = { };
};
};
};
})

View file

@ -22,27 +22,6 @@
"type": "github"
}
},
"blog-pim": {
"inputs": {
"flutils": "flutils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714509035,
"narHash": "sha256-uUwNpBJBlJxNso1KMHJjtLxzcfOuF/lHaesnymbi2RI=",
"ref": "refs/heads/master",
"rev": "649566c8abeea6c38f6e7b98e25fc87317bdf385",
"revCount": 13,
"type": "git",
"url": "https://git.kun.is/home/blog-pim"
},
"original": {
"type": "git",
"url": "https://git.kun.is/home/blog-pim"
}
},
"crane": {
"inputs": {
"nixpkgs": [
@ -113,24 +92,6 @@
"type": "github"
}
},
"flutils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nginx": {
"flake": false,
"locked": {
@ -198,8 +159,7 @@
"root": {
"inputs": {
"attic": "attic",
"blog-pim": "blog-pim",
"flutils": "flutils_2",
"flutils": "flutils",
"nginx": "nginx",
"nixpkgs": "nixpkgs_2"
}
@ -218,21 +178,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -10,15 +10,9 @@
url = "github:nginx/nginx";
flake = false;
};
blog-pim = {
url = "git+https://git.kun.is/home/blog-pim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { flutils, ... }@inputs: flutils.lib.meld inputs [
./blog-pim.nix
./forgejo-nix-action.nix
./atticd.nix
];