added docker gh action

This commit is contained in:
2025-10-26 14:08:55 +01:00
parent e56a9fc1b5
commit d7a387cf45

28
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Docker
on:
push:
branches: [ "main" ]
# paths:
# - 'Cargo.toml'
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build .#docker
- run: docker load -i result
- run: docker tag docki:latest docki:$(nu -c "cargo metadata --format-version=1 --no-deps | from json | get packages | first | get version")
- run: docker image ls