added nix action
This commit is contained in:
38
.github/workflows/docker.yml
vendored
38
.github/workflows/docker.yml
vendored
@@ -1,28 +1,28 @@
|
|||||||
name: Docker
|
name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
# paths:
|
# paths:
|
||||||
# - 'Cargo.toml'
|
# - 'Cargo.toml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: hustcer/setup-nu@v3
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
|
||||||
steps:
|
- run: nix build .#docker
|
||||||
- uses: actions/checkout@v4
|
- run: docker load -i result
|
||||||
- uses: cachix/install-nix-action@v31
|
- run: docker tag docki:latest docki:$(nu -c "cargo metadata --format-version=1 --no-deps | from json | get packages | first | get version")
|
||||||
with:
|
- run: docker image ls
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user