Skip to content

Commit 0209334

Browse files
committed
chore: Allow mirroring of dxflrs/garage
We want to send it do a different project, so for now there is an additional input. Ideally we wouldn't have to keep track of these mappings.
1 parent 52d4003 commit 0209334

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/mirror.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@ on:
1515
- registry.k8s.io/sig-storage/csi-provisioner
1616
- registry.k8s.io/git-sync/git-sync
1717
- registry-1.docker.io/library/golang
18+
- registry-1.docker.io/dxflrs/garage
1819
image-index-manifest-tag:
1920
description: |
2021
The image index manifest tag, like 1.0.14 or v1.0.14
2122
type: string
2223
required: true
24+
# TODO (@NickLarsenNZ): Combine this with the source image above
25+
# So that we don't have to remember which project for which mirrored image
26+
destination-project:
27+
description: |
28+
Destination project in Harbor (eg: sdp, stackable)
29+
type: string
30+
default: sdp
2331

2432
permissions: {}
2533

@@ -65,7 +73,7 @@ jobs:
6573
image-registry-uri: oci.stackable.tech
6674
image-registry-username: robot$sdp+github-action-build
6775
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
68-
image-repository: ${{ format('sdp/{0}', env.IMAGE_REPOSITORY) }}
76+
image-repository: ${{ format('{0}/{1}', inputs.destination-project, env.IMAGE_REPOSITORY) }}
6977
image-manifest-tag: ${{ format('{0}-{1}', inputs.image-index-manifest-tag, matrix.arch) }}
7078
source-image-uri: ${{ format('{0}:{1}', inputs.image-repository-uri, inputs.image-index-manifest-tag) }}
7179

@@ -93,7 +101,7 @@ jobs:
93101
image-registry-uri: oci.stackable.tech
94102
image-registry-username: robot$sdp+github-action-build
95103
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
96-
image-repository: ${{ format('sdp/{0}', env.IMAGE_REPOSITORY) }}
104+
image-repository: ${{ format('{0}/{1}', inputs.destination-project, env.IMAGE_REPOSITORY) }}
97105
image-index-manifest-tag: ${{ inputs.image-index-manifest-tag }}
98106

99107
# NOTE (@Techassi) It is currently not possible to use our own action here, because the inputs

0 commit comments

Comments
 (0)