try fixing docker-image build
Some checks failed
Check / check (push) Successful in 3m47s
Build Images / build (push) Failing after 1m24s

This commit is contained in:
Joakim Repomaa
2026-02-20 21:50:30 +02:00
parent c8c5de288f
commit 6690b5c1ea
2 changed files with 38 additions and 4 deletions

View File

@@ -7,12 +7,45 @@ on:
branches: [main]
jobs:
check:
build:
runs-on: nixos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build Image
run: nix build .#dockerImages.aarch64-linux.node
- name: Install Skopeo
run: nix shell nixpkgs#skopeo -c echo "skopeo installed"
- name: Build x86_64 Image
run: nix build .#dockerImages.x86_64-linux.node --out-link ./image-x86_64.tar.gz
- name: Build aarch64 Image
run: nix build .#dockerImages.aarch64-linux.node --out-link ./image-aarch64.tar.gz
- name: Push to Gitea Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Push x86_64 image
skopeo copy \
--insecure-policy \
--dest-creds "${{ github.actor }}:${GITEA_TOKEN}" \
"docker-archive:./image-x86_64.tar.gz" \
"docker://${{ github.server_url }}/${{ github.repository }}/node:latest-amd64"
# Push aarch64 image
skopeo copy \
--insecure-policy \
--dest-creds "${{ github.actor }}:${GITEA_TOKEN}" \
"docker-archive:./image-aarch64.tar.gz" \
"docker://${{ github.server_url }}/${{ github.repository }}/node:latest-arm64"
# Create and push manifest for multi-arch
skopeo manifest create \
--insecure-policy \
--dest-creds "${{ github.actor }}:${GITEA_TOKEN}" \
"docker://${{ github.server_url }}/${{ github.repository }}/node:latest" \
"docker://${{ github.server_url }}/${{ github.repository }}/node:latest-amd64" \
"docker://${{ github.server_url }}/${{ github.repository }}/node:latest-arm64"

View File

@@ -140,7 +140,7 @@
name = "node";
tag = "latest";
runAsRoot = ''
#!${pkgs.stdenv.shell}
#!${pkgs.runtimeShell}
set -e
${pkgs.dockerTools.shadowSetup}
groupadd -r node
@@ -156,6 +156,7 @@
nix
busybox
bash
skopeo
];
};
config = {