Skip to content

Commit b889c5a

Browse files
committed
ci(pipeline): streamline container registry configuration
- Replaced separate Docker Hub and GitHub Container Registry entries with a unified container image registry variable. - Removed redundant Docker Hub login steps to simplify the CI pipeline. - Updated helm push commands to utilize the new registry variable for consistency.
1 parent 51a8cf9 commit b889c5a

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

.github/workflows/pipeline.yaml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ env:
2828
containerImage: "kubernetes-reflector"
2929
containerImageBuildContext: "src/"
3030
containerImageBuildDockerfile: "src/ES.Kubernetes.Reflector/Dockerfile"
31-
dockerHubContainerImageRepository: "emberstack"
32-
ghcrContainerImageRepository: "ghcr.io/emberstack"
31+
containerImageRegistry: "ghcr.io/emberstack"
3332
helmChart: "reflector"
3433
helmChartDir: "src/helm/reflector"
3534

@@ -135,11 +134,6 @@ jobs:
135134
run: |
136135
echo "${{ secrets.ES_GITHUB_PAT }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
137136
138-
- name: tools - helm - login - docker.io
139-
if: ${{ needs.discovery.outputs.requiresBuildPush == 'true' }}
140-
run: |
141-
echo "${{ secrets.ES_DOCKERHUB_PAT }}" | helm registry login registry-1.docker.io -u ${{ secrets.ES_DOCKERHUB_USERNAME }} --password-stdin
142-
143137
- name: tools - docker - login ghcr.io
144138
if: ${{ needs.discovery.outputs.requiresBuildPush == 'true' }}
145139
uses: docker/login-action@v3
@@ -148,14 +142,6 @@ jobs:
148142
username: ${{ github.actor }}
149143
password: ${{ secrets.ES_GITHUB_PAT }}
150144

151-
- name: tools - docker - login docker.io
152-
if: ${{ needs.discovery.outputs.requiresBuildPush == 'true' }}
153-
uses: docker/login-action@v3
154-
with:
155-
registry: docker.io
156-
username: ${{ secrets.ES_DOCKERHUB_USERNAME }}
157-
password: ${{ secrets.ES_DOCKERHUB_PAT }}
158-
159145
- name: tools - docker - register QEMU
160146
run: |
161147
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@@ -165,7 +151,6 @@ jobs:
165151
with:
166152
driver: docker-container # REQUIRED for multi-platform builds
167153

168-
169154
- name: artifacts - prepare directories
170155
run: |
171156
mkdir -p .artifacts/helm
@@ -189,16 +174,11 @@ jobs:
189174
provenance: false
190175
platforms: linux/amd64,linux/arm/v7,linux/arm64
191176
tags: |
192-
${{ env.dockerHubContainerImageRepository }}/${{ env.containerImage }}:${{ env.gitVersion_SemVer }}
193-
${{ env.ghcrContainerImageRepository }}/${{ env.containerImage }}:${{ env.gitVersion_SemVer }}
177+
${{ env.containerImageRegistry }}/${{ env.containerImage }}:${{ env.gitVersion_SemVer }}
194178
195-
- name: helm - push - ghcr
179+
- name: helm - push - ghcr.io
196180
run: helm push .artifacts/helm/${{ env.helmChart }}-${{ env.gitVersion_SemVer }}.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts
197181

198-
- name: helm - push - docker.io
199-
run: helm push .artifacts/helm/${{ env.helmChart }}-${{ env.gitVersion_SemVer }}.tgz oci://registry-1.docker.io/${{ github.repository_owner }}/helm-charts
200-
201-
202182
- name: "artifacts - upload - helm chart"
203183
uses: actions/upload-artifact@v4
204184
with:

0 commit comments

Comments
 (0)