try fixing docker-image build
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user