50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Build Images
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: nixos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Debug environment
|
|
run: |
|
|
echo "=== System Info ==="
|
|
uname -a
|
|
nix --version
|
|
echo "=== Memory ==="
|
|
free -h || true
|
|
echo "=== Disk ==="
|
|
df -h /nix /tmp || true
|
|
echo "=== Nix Config ==="
|
|
nix show-config 2>&1 | head -20 || true
|
|
|
|
- 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 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 arm64
|
|
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-arm64"
|