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
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
# paths:
|
||||
# - 'Cargo.toml'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
push:
|
||||
branches: ["main"]
|
||||
# paths:
|
||||
# - 'Cargo.toml'
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
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:
|
||||
- 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
|
||||
- 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