Skip to content

Commit ddb7105

Browse files
committed
fix: remove manifest from push docker image
1 parent 62ab8a5 commit ddb7105

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
run: |
198198
nix build .#image-${{ matrix.arch }}
199199
docker load < ./result
200-
docker tag grhooks:${{ env.VERSION }} ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ matrix.arch }}
200+
docker tag grhooks:${{ env.VERSION }} ghcr.io/${{ env.REPOSITORY }}:${{ matrix.arch }}
201201
202202
docker-publish:
203203
runs-on: ubuntu-latest
@@ -217,15 +217,15 @@ jobs:
217217
run: echo "REPOSITORY=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
218218
- name: Create and push manifest
219219
run: |
220-
IMAGE=ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ env.VERSION }}
220+
IMAGE=ghcr.io/${{ env.REPOSITORY }}:${{ env.VERSION }}
221221
222222
echo "Creating manifest for architectures: $ARCHS"
223223
224224
manifest_args=""
225225
for arch in $(echo "$ARCHS" | jq -r '.[].arch'); do
226-
manifest_args="$manifest_args --amend ghcr.io/${{ env.REPOSITORY }}/grhooks:$arch"
226+
manifest_args="$manifest_args --amend ghcr.io/${{ env.REPOSITORY }}:$arch"
227227
done
228228
229229
echo "Running docker manifest create $IMAGE $manifest_args"
230230
eval docker manifest create $IMAGE $manifest_args
231-
docker manifest push $IMAGE
231+
docker push $IMAGE

flake.nix

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@
4949
{ arch = "aarch64"; os = "linux"; target = "aarch64-unknown-linux-gnu"; formats = ["deb" "rpm" "tar.xz"]; }
5050
{ arch = "armv7l"; os = "linux"; target = "armv7-unknown-linux-gnueabihf"; formats = ["tar.xz"]; }
5151
{ arch = "armv6l"; os = "linux"; target = "arm-unknown-linux-gnueabihf"; formats = ["tar.xz"]; }
52-
{ arch = "riscv32"; os = "linux"; target = "riscv32gc-unknown-linux-gnu"; formats = ["tar.xz"]; }
53-
{ arch = "riscv64"; os = "linux"; target = "riscv64gc-unknown-linux-gnu"; formats = ["tar.xz"]; }
52+
# { arch = "riscv32"; os = "linux"; target = "riscv32gc-unknown-linux-gnu"; formats = ["tar.xz"]; }
53+
# { arch = "riscv64"; os = "linux"; target = "riscv64gc-unknown-linux-gnu"; formats = ["tar.xz"]; }
5454
# MacOS
5555
{ arch = "x86_64"; os = "macos"; target = "x86_64-apple-darwin"; formats = ["tar.xz"]; }
5656
{ arch = "aarch64"; os = "macos"; target = "aarch64-apple-darwin"; formats = ["tar.xz"]; }
5757
# Windows
5858
{ arch = "x86_64"; os = "windows"; target = "x86_64-pc-windows-msvc"; formats = ["zip"]; }
59-
{ arch = "i686"; os = "windows"; target = "i686-pc-windows-msvc"; formats = ["zip"]; }
6059
];
6160

6261
mkDevShell = { arch, os, ... }: pkgs.mkShell {
@@ -85,12 +84,18 @@
8584

8685
containerPkg = variant: let
8786
pkg = mkPackage variant;
88-
# arch = if variant.arch == "x86_64" then "amd" else "arm";
87+
dockerPlatform =
88+
if variant.arch == "x86_64" then "amd64"
89+
else if variant.arch == "aarch64" then "arm64"
90+
else if variant.arch == "armv7l" then "arm"
91+
else if variant.arch == "armv6l" then "arm"
92+
else if variant.arch == "i686" then "386"
93+
else throw "Unsupported arch: ${variant.arch}";
8994
in pkgs.dockerTools.buildLayeredImage rec {
9095
name = cargoManifest.package.name;
9196
tag = cargoManifest.package.version;
9297
created = "now";
93-
# architecture = "linux/${arch}64";
98+
architecture = dockerPlatform;
9499

95100
contents = [ pkg ];
96101
config.Cmd = ["/bin/${name}"];

0 commit comments

Comments
 (0)