Compare commits
3 commits
bdb8fbc1a5
...
1ccd2f8b98
Author | SHA1 | Date | |
---|---|---|---|
1ccd2f8b98 | |||
7a2dbc4a41 | |||
4c3b506937 |
6 changed files with 101 additions and 25 deletions
|
@ -10,4 +10,7 @@ jobs:
|
||||||
- name: Attic login
|
- name: Attic login
|
||||||
run: attic login sisko http://10.100.0.1:8081 ${{secrets.ATTIC_SISKO_TOKEN}}
|
run: attic login sisko http://10.100.0.1:8081 ${{secrets.ATTIC_SISKO_TOKEN}}
|
||||||
- name: Build with nix
|
- name: Build with nix
|
||||||
run: nix-fast-build --no-nom --skip-cached --systems "x86_64-linux aarch64-linux" --attic-cache "sisko"
|
run: nix-fast-build --no-nom --skip-cached --systems "x86_64-linux aarch64-linux" --attic-cache "sisko" --result-file result.json || true
|
||||||
|
- name: Report checks
|
||||||
|
run: report-checks
|
||||||
|
|
||||||
|
|
44
flake.lock
generated
44
flake.lock
generated
|
@ -119,11 +119,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732266182,
|
"lastModified": 1732468280,
|
||||||
"narHash": "sha256-NuajQPP1ZVtviwC+Y3J42RV7V7TsCo+A+ux2aC9oW9s=",
|
"narHash": "sha256-z04IEIYlO/KMeXQCt7neM/WDlIVtQjy+QGDrTwDNwHc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "2bbf361a5d58fd97f31bd871e334f0682b98c905",
|
"rev": "72c506de74f90bc47bfe62627844b973b493a377",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -485,11 +485,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732025103,
|
"lastModified": 1732472774,
|
||||||
"narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
|
"narHash": "sha256-nfD12L8mm1Zcg0keslWrQgaqj+ZSjQnK6Hf6ryIZA0c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a46e702093a5c46e192243edbd977d5749e7f294",
|
"rev": "83002f18468c4471d5f8de8c542ed2422badbf8f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -589,11 +589,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731890968,
|
"lastModified": 1732351635,
|
||||||
"narHash": "sha256-6xMxT2duVMO6fo1AXfTjqh7LW3ZmNiHw6kBaAhweLGo=",
|
"narHash": "sha256-H94CcQ3yamG5+RMxtxXllR02YIlxQ5WD/8PcolO9yEA=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "912a9d63319e71ca131e16eea3348145a255db2e",
|
"rev": "dfc286ca3dc49118c30d8d6205d6d6af76c62b7a",
|
||||||
"revCount": 616,
|
"revCount": 617,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.lix.systems/lix-project/nix-eval-jobs"
|
"url": "https://git.lix.systems/lix-project/nix-eval-jobs"
|
||||||
},
|
},
|
||||||
|
@ -699,11 +699,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729742964,
|
"lastModified": 1731952509,
|
||||||
"narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
|
"narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-github-actions",
|
"repo": "nix-github-actions",
|
||||||
"rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
|
"rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -740,11 +740,11 @@
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732229547,
|
"lastModified": 1732420287,
|
||||||
"narHash": "sha256-vtUhSQFgDfyyNM6rgmn35A2T+L5PXBS0H89cxWK9N2A=",
|
"narHash": "sha256-CzvYF4x6jUh/+NEEIFrIY5t1W/N3IA2bNZJiMXu9GTo=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "edabc790a834326dcb5810e2698fa743483510d0",
|
"rev": "3c52583b99666a349a6219dc1f0dd07d75c82d6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1284,11 +1284,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730321837,
|
"lastModified": 1732292307,
|
||||||
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
|
"narHash": "sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
|
"rev": "705df92694af7093dfbb27109ce16d828a79155f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1325,11 +1325,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732187120,
|
"lastModified": 1732292307,
|
||||||
"narHash": "sha256-XdW2mYXvPHYtZ8oQqO3tRYtxx7kI0Hs3NU64IwAtD68=",
|
"narHash": "sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "37f8f47cb618eddee0c0dd31a582b1cd3013c7f6",
|
"rev": "705df92694af7093dfbb27109ce16d828a79155f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
screenshotScript = pkgs.writeShellScriptBin "screenshot.sh" ''
|
screenshotScript = pkgs.writeShellScriptBin "screenshot.sh" ''
|
||||||
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
filename="$HOME/shots/$(date --iso-8601=seconds).png"
|
||||||
|
|
|
@ -18,7 +18,7 @@ input {
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
|
monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
|
||||||
monitor = eDP-1, 1920x1080, 0x0, 1 # kirk
|
monitor = eDP-1, 1920x1080, 0x0, 1, mirror, DP-1 # kirk
|
||||||
|
|
||||||
bindl=,switch:off:Lid Switch,exec,switch-monitor.sh open
|
bindl=,switch:off:Lid Switch,exec,switch-monitor.sh open
|
||||||
bindl=,switch:on:Lid Switch,exec,switch-monitor.sh close
|
bindl=,switch:on:Lid Switch,exec,switch-monitor.sh close
|
||||||
|
|
39
packages/forgejo-report-checks/default.nix
Normal file
39
packages/forgejo-report-checks/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
writers,
|
||||||
|
python3Packages,
|
||||||
|
fetchFromGitea,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
pyforgejo = python3Packages.buildPythonPackage rec {
|
||||||
|
pname = "pyforgejo";
|
||||||
|
version = "1.0.4";
|
||||||
|
|
||||||
|
pyproject = true;
|
||||||
|
build-system = [ python3Packages.poetry-core ];
|
||||||
|
|
||||||
|
src = fetchFromGitea {
|
||||||
|
domain = "codeberg.org";
|
||||||
|
owner = "harabat";
|
||||||
|
repo = "pyforgejo";
|
||||||
|
rev = "3dba949bea41140a47e4dd422a84a6da9fd394e9";
|
||||||
|
hash = "sha256-qVXlfhKrc7yBnRvL/65bLZFW9fDjC+8FNz7yA6iMPp4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pythonRelaxDeps = [
|
||||||
|
"httpx"
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = with python3Packages; [
|
||||||
|
attrs
|
||||||
|
httpx
|
||||||
|
python-dateutil
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pyforgejo" ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
writers.writePython3Bin "report-checks" {
|
||||||
|
libraries = [ pyforgejo ];
|
||||||
|
flakeIgnore = [ "E501" ];
|
||||||
|
} (builtins.readFile ./forgejo-report-checks.py)
|
30
packages/forgejo-report-checks/forgejo-report-checks.py
Normal file
30
packages/forgejo-report-checks/forgejo-report-checks.py
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
from pyforgejo import AuthenticatedClient
|
||||||
|
from pyforgejo.api.repository import repo_create_status
|
||||||
|
from pyforgejo.models.create_status_option import CreateStatusOption
|
||||||
|
import json
|
||||||
|
from os import environ
|
||||||
|
|
||||||
|
client = AuthenticatedClient(base_url=environ["GITHUB_API_URL"], token=environ["GITHUB_TOKEN"])
|
||||||
|
|
||||||
|
print("hello")
|
||||||
|
|
||||||
|
with open('result.json', 'r') as file:
|
||||||
|
data = json.load(file)
|
||||||
|
|
||||||
|
for result in data['results']:
|
||||||
|
attr = result['attr']
|
||||||
|
success = result['success']
|
||||||
|
type = result['type']
|
||||||
|
print(attr)
|
||||||
|
response = repo_create_status.sync_detailed(
|
||||||
|
owner="aciceri",
|
||||||
|
repo="nixfleet",
|
||||||
|
sha=environ["GITHUB_SHA"],
|
||||||
|
client=client,
|
||||||
|
body=CreateStatusOption(
|
||||||
|
context=type,
|
||||||
|
description=attr,
|
||||||
|
target_url="https://google.com",
|
||||||
|
state="success" if success else "failure" # ma be pending,success,failure,error_message
|
||||||
|
)
|
||||||
|
)
|
Loading…
Add table
Reference in a new issue