This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: Build container
|
||||
name: Build image
|
||||
on: [push]
|
||||
jobs:
|
||||
build-container:
|
||||
build-image:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
@@ -12,12 +12,17 @@ jobs:
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
enable_kvm: false
|
||||
- name: Build container
|
||||
run: nix build .#docker
|
||||
- name: Build image
|
||||
run: nix build .#image
|
||||
- run: ls -l
|
||||
- run: ls -l $(readlink -f result)
|
||||
- name: Install crane
|
||||
run: |
|
||||
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.3/go-containerregistry_Linux_x86_64.tar.gz" > go-containerregistry.tar.gz
|
||||
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane
|
||||
- run: crane push result
|
||||
- name: Get image name
|
||||
run: nix build .#image-name -o image-name
|
||||
|
||||
- run: echo $(cat image-name)
|
||||
|
||||
- run: crane push result $(cat image-name)
|
||||
|
||||
Reference in New Issue
Block a user