Skip to content

Commit b421304

Browse files
authored
Fix ECR & GHCR sync (#492)
Fixes #493
1 parent 61229db commit b421304

3 files changed

Lines changed: 32 additions & 10 deletions

File tree

.github/workflows/sync-ecr.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ jobs:
3333
runs-on: ubuntu-latest
3434
strategy:
3535
matrix:
36-
image: ["pulumi", "pulumi-provider-build-environment"]
3736
include:
38-
# For the pulumi image add a the nonroot variant
39-
- suffix: -nonroot
40-
image: pulumi
37+
- image: pulumi-provider-build-environment
38+
suffix: ""
39+
- image: pulumi
40+
suffix: ""
41+
- image: pulumi
42+
suffix: "-nonroot"
4143
steps:
4244
- name: Fetch secrets from ESC
4345
id: esc-secrets
@@ -68,13 +70,20 @@ jobs:
6870
docker pull docker.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
6971
docker tag docker.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
7072
docker push public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
73+
- name: Push ${{ env.PULUMI_VERSION }} manifest
74+
run: |
75+
docker manifest create \
76+
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }} \
77+
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 \
78+
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-arm64
79+
docker manifest push public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}
7180
- name: Push latest manifest
7281
if: ${{ github.event.inputs.tag_latest || github.event_name == 'repository_dispatch' }}
7382
run: |
7483
docker manifest create \
7584
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:latest${{ matrix.suffix }} \
7685
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 \
77-
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
86+
public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-arm64
7887
docker manifest push public.ecr.aws/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:latest${{ matrix.suffix }}
7988
8089
define-debian-matrix:

.github/workflows/sync-ghcr.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
image: ["pulumi", "pulumi-provider-build-environment"]
3130
include:
32-
# For the pulumi image add a the nonroot variant
33-
- suffix: -nonroot
34-
image: pulumi
31+
- image: pulumi-provider-build-environment
32+
suffix: ""
33+
- image: pulumi
34+
suffix: ""
35+
- image: pulumi
36+
suffix: "-nonroot"
3537
steps:
3638
- name: Login to GitHub Container Registry
3739
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
@@ -49,10 +51,16 @@ jobs:
4951
docker pull docker.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
5052
docker tag docker.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
5153
docker push ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64
54+
- name: Push ${{ env.PULUMI_VERSION }} manifest
55+
run: |
56+
docker manifest create \
57+
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }} \
58+
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 \
59+
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-arm64
60+
docker manifest push ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}
5261
- name: Push latest manifest to GHCR
5362
if: ${{ github.event.inputs.tag_latest || github.event_name == 'repository_dispatch' }}
5463
run: |
55-
# TODO: https://github.com/pulumi/pulumi-docker-containers/issues/297
5664
docker manifest create \
5765
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:latest${{ matrix.suffix }} \
5866
ghcr.io/${{ env.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.PULUMI_VERSION }}${{ matrix.suffix }}-amd64 \

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
- Fix pushing all image variants of pulumi/pulumi to ECR and GHCR
6+
([#492](https://github.com/pulumi/pulumi-docker-containers/pull/492))
7+
8+
## 3.178.0
9+
510
- Pin Gradle to 8.14.2 and Maven to 3.9.10 in the UBI Java image
611
([#487](https://github.com/pulumi/pulumi-docker-containers/pull/487))
712

0 commit comments

Comments
 (0)