Compare commits
No commits in common. "f0c94d8d7d004ebbba8d935cfca2d97e27e7265e" and "723372238bf6aaeb378c276f0c95a637b12b880f" have entirely different histories.
f0c94d8d7d
...
723372238b
@ -1,32 +0,0 @@
|
|||||||
name: Build image
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
jobs:
|
|
||||||
build-image:
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
# Required for installing nix
|
|
||||||
- name: Install sudo
|
|
||||||
run: apt-get update && apt-get install -y sudo
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v31
|
|
||||||
with:
|
|
||||||
enable_kvm: false
|
|
||||||
- name: Get image meta
|
|
||||||
run: nix build .#image-meta -o image-meta
|
|
||||||
- name: Version check
|
|
||||||
run: |
|
|
||||||
VERSION=$(cat image-meta/version)
|
|
||||||
[ "$GITHUB_REF_NAME" = v"$VERSION" ]
|
|
||||||
- name: Build image
|
|
||||||
run: nix build .#image -o image.tar.gz
|
|
||||||
- run: docker login -u paul -p "$PASSWORD" git.pbrinkmeier.de
|
|
||||||
env:
|
|
||||||
PASSWORD: "${{ secrets.REGISTRY_PASSWORD }}"
|
|
||||||
- run: docker load < image.tar.gz
|
|
||||||
- run: docker image push $(cat image-meta/name)
|
|
@ -39,12 +39,7 @@
|
|||||||
};
|
};
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
default = vrnp-static;
|
default = vrnp-static;
|
||||||
image-meta = pkgs.runCommand "vrnp-version" {} ''
|
docker = pkgs.dockerTools.buildImage {
|
||||||
mkdir -p $out
|
|
||||||
echo -n ${vrnp-static.version} > $out/version
|
|
||||||
echo -n git.pbrinkmeier.de/paul/vrnp:${vrnp-static.version} > $out/name
|
|
||||||
'';
|
|
||||||
image = pkgs.dockerTools.buildImage {
|
|
||||||
name = "git.pbrinkmeier.de/paul/vrnp";
|
name = "git.pbrinkmeier.de/paul/vrnp";
|
||||||
tag = vrnp-static.version;
|
tag = vrnp-static.version;
|
||||||
copyToRoot = pkgs.buildEnv {
|
copyToRoot = pkgs.buildEnv {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user