CI #1
40
.gitea/workflows/deliver.yml
Normal file
40
.gitea/workflows/deliver.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: deliver
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
jobs:
|
||||||
|
deliver:
|
||||||
|
container:
|
||||||
|
image: node:24-bookworm
|
||||||
|
env:
|
||||||
|
USER: node
|
||||||
|
HOME: /home/node
|
||||||
|
NIX_CONFIG: experimental-features = nix-command flakes
|
||||||
|
volumes:
|
||||||
|
- /var/lib/pbri/docker/nix_runner_nix:/nix
|
||||||
|
- /var/lib/pbri/docker/nix_runner_etc:/etc/nix
|
||||||
|
- /var/lib/pbri/docker/nix_runner_home_node:/home/node
|
||||||
|
options: --user 1000:1000
|
||||||
|
steps:
|
||||||
|
- name: Prep nix env
|
||||||
|
run: |
|
||||||
|
if [ ! -f ~/.nix-profile/etc/profile.d/nix.sh ]; then
|
||||||
|
curl -L https://nixos.org/nix/install | bash -s -- --no-daemon
|
||||||
|
fi
|
||||||
|
. ~/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
env >> "$GITHUB_ENV"
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Get image meta
|
||||||
|
run: nix build .#yore-meta -o /tmp/yore-meta
|
||||||
|
- name: Version check
|
||||||
|
run: |
|
||||||
|
VERSION=$(cat /tmp/yore-meta/version)
|
||||||
|
[ "$GITHUB_REF_NAME" = v"$VERSION" ]
|
||||||
|
- run: nix build --log-format raw --print-build-logs .#image -o image.tar.gz
|
||||||
|
- run: gunzip -c image.tar.gz > image.tar
|
||||||
|
- run: nix run .#crane -- auth login git.pbrinkmeier.de -u paul -p "$PASSWORD"
|
||||||
|
env:
|
||||||
|
PASSWORD: "${{ secrets.REGISTRY_PASSWORD }}"
|
||||||
|
- run: nix run .#crane -- push image.tar $(cat image-meta/name)
|
||||||
@ -95,5 +95,11 @@
|
|||||||
overrides = addOpium;
|
overrides = addOpium;
|
||||||
}).env;
|
}).env;
|
||||||
};
|
};
|
||||||
|
apps = {
|
||||||
|
crane = {
|
||||||
|
type = "app";
|
||||||
|
program = "${pkgs.crane}/bin/crane";
|
||||||
|
};
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
cabal-version: 3.4
|
cabal-version: 3.4
|
||||||
|
|
||||||
name: yore
|
name: yore
|
||||||
version: 0
|
version: 0.0.1
|
||||||
author: Paul Brinkmeier
|
author: Paul Brinkmeier
|
||||||
maintainer: hallo@pbrinkmeier.de
|
maintainer: hallo@pbrinkmeier.de
|
||||||
copyright: 2023 Paul Brinkmeier
|
copyright: 2023 Paul Brinkmeier
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user