Skip to content

Commit 9bc6edf

Browse files
committed
Remove gcr registry from workflows
Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
1 parent b476eb9 commit 9bc6edf

3 files changed

Lines changed: 9 additions & 65 deletions

File tree

‎.github/workflows/publish_image_chart.yaml‎

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99

1010
env:
1111
GHCR: ghcr.io
12-
GCR: gcr.io
1312
HELM_VERSION: 3.8.2
1413

1514
jobs:
@@ -20,9 +19,6 @@ jobs:
2019
packages: write
2120
strategy:
2221
matrix:
23-
container_registry:
24-
- ghcr.io/pipe-cd
25-
- gcr.io/pipecd
2622
image:
2723
- helloworld
2824
- launcher
@@ -46,15 +42,6 @@ jobs:
4642
dockerfile: cmd/piped/Dockerfile-okd
4743
- image: pipectl
4844
dockerfile: cmd/pipectl/Dockerfile
49-
exclude:
50-
- image: launcher-okd
51-
container_registry: gcr.io/pipecd
52-
- image: controlplane
53-
container_registry: gcr.io/pipecd
54-
- image: piped-okd
55-
container_registry: gcr.io/pipecd
56-
- image: pipectl
57-
container_registry: gcr.io/pipecd
5845

5946
steps:
6047
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -77,13 +64,6 @@ jobs:
7764
username: ${{ github.actor }}
7865
password: ${{ secrets.GITHUB_TOKEN }}
7966

80-
- name: Log in to GCR
81-
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
82-
with:
83-
registry: ${{ env.GCR }}
84-
username: _json_key
85-
password: ${{ secrets.GCR_SA }}
86-
8767
# Building and pushing container images.
8868
- name: Build and push ${{ matrix.image }} image
8969
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
@@ -92,9 +72,9 @@ jobs:
9272
context: .
9373
file: ${{ matrix.dockerfile }}
9474
platforms: linux/amd64,linux/arm64
95-
tags: ${{ matrix.container_registry }}/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
75+
tags: ${{ env.GHCR }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
9676
# parameter to use inline cache. ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache
97-
cache-from: type=registry,ref=${{ matrix.container_registry }}/${{ matrix.image }}:latest
77+
cache-from: type=registry,ref=${{ env.GHCR }}/pipe-cd/${{ matrix.image }}:latest
9878
cache-to: type=inline
9979

10080
# Publish Helm charts once, only after every image in the artifacts matrix has

‎.github/workflows/publish_pipedv1_exp.yaml‎

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ permissions: {}
1212
env:
1313
GO_VERSION: 1.26.2
1414
GHCR: ghcr.io
15-
GCR: gcr.io
1615
HELM_VERSION: 3.8.2
1716

1817
jobs:
@@ -59,9 +58,6 @@ jobs:
5958
arch: amd64
6059
- runner: ubuntu-24.04-arm
6160
arch: arm64
62-
container_registry:
63-
- ghcr.io/pipe-cd
64-
- gcr.io/pipecd
6561
runs-on: ${{ matrix.platform.runner }}
6662
permissions:
6763
contents: read
@@ -82,13 +78,6 @@ jobs:
8278
username: ${{ github.actor }}
8379
password: ${{ secrets.GITHUB_TOKEN }}
8480

85-
- name: Log in to GCR
86-
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
87-
with:
88-
registry: ${{ env.GCR }}
89-
username: _json_key
90-
password: ${{ secrets.GCR_SA }}
91-
9281
# Build and push image by digest (without tag)
9382
- name: Build and push pipedv1 experimental image (${{ matrix.platform.arch }})
9483
id: build
@@ -97,8 +86,8 @@ jobs:
9786
context: .
9887
file: cmd/pipedv1/Dockerfile
9988
platforms: linux/${{ matrix.platform.arch }}
100-
outputs: type=image,name=${{ matrix.container_registry }}/pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
101-
cache-from: type=registry,ref=${{ matrix.container_registry }}/pipedv1-exp:latest
89+
outputs: type=image,name=${{ env.GHCR }}/pipe-cd/pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
90+
cache-from: type=registry,ref=${{ env.GHCR }}/pipe-cd/pipedv1-exp:latest
10291
cache-to: type=inline
10392

10493
# Export digest as artifact for merge job
@@ -111,7 +100,7 @@ jobs:
111100
- name: Upload digest
112101
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
113102
with:
114-
name: digests-pipedv1-exp-${{ matrix.platform.arch }}-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
103+
name: digests-pipedv1-exp-${{ matrix.platform.arch }}
115104
path: /tmp/digests/*
116105
if-no-files-found: error
117106
retention-days: 1
@@ -123,11 +112,6 @@ jobs:
123112
permissions:
124113
contents: read
125114
packages: write
126-
strategy:
127-
matrix:
128-
container_registry:
129-
- ghcr.io/pipe-cd
130-
- gcr.io/pipecd
131115
steps:
132116
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
133117
with:
@@ -137,7 +121,7 @@ jobs:
137121
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
138122
with:
139123
path: /tmp/digests
140-
pattern: digests-pipedv1-exp-*-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
124+
pattern: digests-pipedv1-exp-*
141125
merge-multiple: true
142126

143127
- name: Set up Docker Buildx
@@ -151,24 +135,17 @@ jobs:
151135
username: ${{ github.actor }}
152136
password: ${{ secrets.GITHUB_TOKEN }}
153137

154-
- name: Log in to GCR
155-
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
156-
with:
157-
registry: ${{ env.GCR }}
158-
username: _json_key
159-
password: ${{ secrets.GCR_SA }}
160-
161138
# Create and push multi-arch manifest
162139
- name: Create manifest list and push
163140
working-directory: /tmp/digests
164141
run: |
165142
docker buildx imagetools create \
166-
-t ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }} \
167-
$(printf '${{ matrix.container_registry }}/pipedv1-exp@sha256:%s ' *)
143+
-t ${{ env.GHCR }}/pipe-cd/pipedv1-exp:${{ inputs.version }} \
144+
$(printf '${{ env.GHCR }}/pipe-cd/pipedv1-exp@sha256:%s ' *)
168145
169146
- name: Inspect image
170147
run: |
171-
docker buildx imagetools inspect ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }}
148+
docker buildx imagetools inspect ${{ env.GHCR }}/pipe-cd/pipedv1-exp:${{ inputs.version }}
172149
173150
image_chart:
174151
runs-on: ubuntu-24.04

‎Makefile‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,6 @@ build/plugin:
9292
done
9393
@echo "Plugins are built and copied to $(PLUGINS_BIN_DIR)"
9494

95-
.PHONY: push
96-
push/chart: BUCKET ?= charts.pipecd.dev
97-
push/chart: VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]*.*')
98-
push/chart: CREDENTIALS_FILE ?= ~/.config/gcloud/application_default_credentials.json
99-
push/chart:
100-
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/pipecd/Chart.yaml
101-
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/controlplane/Chart.yaml
102-
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/piped/Chart.yaml
103-
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/site/Chart.yaml
104-
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/helloworld/Chart.yaml
105-
docker run --rm -it -v ${CREDENTIALS_FILE}:/secret -v ${PWD}:/repo gcr.io/pipecd/chart-releaser@sha256:fc432431b411a81d7658355c27ebaa924afe190962ab11d46f5a6cdff0833cc3 /chart-releaser --bucket=${BUCKET} --manifests-dir=repo/manifests --credentials-file=secret #v0.13.0
106-
@git checkout manifests/
107-
10895
# Test commands
10996

11097
..PHONY: test

0 commit comments

Comments
 (0)