Skip to content

Commit

Permalink
use manifest-tool to create multi-arch image
Browse files Browse the repository at this point in the history
  • Loading branch information
ingon committed Jan 9, 2025
1 parent f7010a6 commit 087b2f3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/tip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,24 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker push
run: nix develop --command skopeo copy "docker-archive:result" "docker://ghcr.io/connet-dev/connet:latest-arm64"

docker-multiarch:
name: Tag multi-arch
runs-on: ubuntu-latest
needs: [docker-build-x86, docker-build-arm]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Docker login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker tag
run: nix develop --command manifest-tool push from-args --platforms linux/amd64,linux/arm64 --template connet-dev/connet:latest-ARCHVARIANT --target connet-dev/connet:latest

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
outputs = { nixpkgs, flake-utils, ... }:
{
nixosModules.default = ./nix/client-module.nix;
nixosModules.server = ./nix/server-module.nix;
Expand All @@ -30,6 +30,7 @@
gopls
golangci-lint
fd
manifest-tool
protobuf
protoc-gen-go
process-compose
Expand Down

0 comments on commit 087b2f3

Please sign in to comment.