try fixing docker-image build
This commit is contained in:
@@ -7,12 +7,45 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
build:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Build Image
|
- name: Install Skopeo
|
||||||
run: nix build .#dockerImages.aarch64-linux.node
|
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"
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
name = "node";
|
name = "node";
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
runAsRoot = ''
|
runAsRoot = ''
|
||||||
#!${pkgs.stdenv.shell}
|
#!${pkgs.runtimeShell}
|
||||||
set -e
|
set -e
|
||||||
${pkgs.dockerTools.shadowSetup}
|
${pkgs.dockerTools.shadowSetup}
|
||||||
groupadd -r node
|
groupadd -r node
|
||||||
@@ -156,6 +156,7 @@
|
|||||||
nix
|
nix
|
||||||
busybox
|
busybox
|
||||||
bash
|
bash
|
||||||
|
skopeo
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user