lets try another avenue...
Some checks failed
Test action / Print hello world (push) Failing after 13s
Some checks failed
Test action / Print hello world (push) Failing after 13s
This commit is contained in:
parent
33f9a7fbd8
commit
b8e43fedba
3 changed files with 23 additions and 28 deletions
|
@ -24,36 +24,28 @@ jobs:
|
||||||
- name: Prepare podman
|
- 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.kmod
|
nix-env -iA nixpkgs.podman
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# ensure all required directories exist with proper permissions
|
|
||||||
mkdir -p /tmp/podman /var/tmp ~/.local/share/containers
|
|
||||||
chmod 755 /tmp/podman /var/tmp || true
|
|
||||||
|
|
||||||
# set multiple environment variables for skopeo temporary directories
|
|
||||||
export TMPDIR=/tmp/podman
|
|
||||||
export TMP=/tmp/podman
|
|
||||||
export TEMP=/tmp/podman
|
|
||||||
export XDG_RUNTIME_DIR=/tmp/podman
|
|
||||||
|
|
||||||
modprobe fuse
|
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
run: |
|
run: |
|
||||||
podman login --username "${{ forge.actor }}" --password "${{ forge.token }}" ${{ env.registry }}
|
podman login --username "${{ forge.actor }}" --password "${{ forge.token }}" ${{ env.registry }}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: >-
|
run: nix-build modules/nixos/services/development/forgejo/runners/default.nix
|
||||||
podman build
|
# run: >-
|
||||||
-t ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
|
# podman build
|
||||||
-f Dockerfile.default
|
# -t ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
|
||||||
modules/nixos/services/development/forgejo
|
# -f Dockerfile.default
|
||||||
env:
|
# modules/nixos/services/development/forgejo
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
|
- name: __DEBUG__
|
||||||
|
run: |
|
||||||
|
ls -al result
|
||||||
|
podman load < result
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
FROM docker.io/nixos/nix:latest
|
|
||||||
|
|
||||||
RUN nix-env -iA nixpkgs.nodejs_24 nixpkgs.podman
|
|
||||||
|
|
||||||
RUN echo "experimental-features = nix-command flakes pipe-operators" >> /etc/nix/nix.conf
|
|
||||||
RUN echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' >> /etc/containers/policy.json
|
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> {},
|
||||||
|
pkgs_linux ? import <nixpkgs> { system = "x86_64-linux"; },
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.dockerTools.buildImage {
|
||||||
|
name = "default";
|
||||||
|
config = {
|
||||||
|
Cmd = [ "${pkgs_linux.hello}/bin/hello" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue