This commit is contained in:
parent
12a4a85510
commit
05f1bdbe1a
1 changed files with 9 additions and 12 deletions
|
|
@ -17,25 +17,17 @@ jobs:
|
||||||
name: Build and push images
|
name: Build and push images
|
||||||
runs-on: default
|
runs-on: default
|
||||||
steps:
|
steps:
|
||||||
- name: Install nodejs
|
- name: Install dependencies
|
||||||
run: nix-env -iA nixpkgs.nodejs
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Prepare podman
|
|
||||||
run: |
|
run: |
|
||||||
# configure container policy to accept insecure registry
|
# configure container policy to accept insecure registry
|
||||||
nix-env -iA nixpkgs.podman nixpkgs.kvmtool
|
nix-env -iA nixpkgs.nodejs nixpkgs.podman nixpkgs.kvmtool nixpkgs.curl nixpkgs.jq
|
||||||
|
|
||||||
# configure container policy to accept insecure registry
|
# configure container policy to accept insecure registry
|
||||||
mkdir -p ~/.config/containers
|
mkdir -p ~/.config/containers
|
||||||
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
|
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
|
||||||
|
|
||||||
- name: Create image
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
nix-build src/default.nix
|
|
||||||
podman load < result
|
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
run: |
|
run: |
|
||||||
podman login \
|
podman login \
|
||||||
|
|
@ -52,6 +44,11 @@ jobs:
|
||||||
echo "~/.config/containers/auth.json"
|
echo "~/.config/containers/auth.json"
|
||||||
[ -f ~/.config/containers/auth.json ] && cat ~/.config/containers/auth.json || echo "file doesn't exist"
|
[ -f ~/.config/containers/auth.json ] && cat ~/.config/containers/auth.json || echo "file doesn't exist"
|
||||||
|
|
||||||
|
- name: Create image
|
||||||
|
run: |
|
||||||
|
nix-build src/default.nix
|
||||||
|
podman load < result
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: >-
|
run: >-
|
||||||
podman push
|
podman push
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue