Skip to content

Commit 43c7d5b

Browse files
authored
Merge pull request #1210 from o1-labs/dw/remove-push-as-dockerhub-creds-removed
CI/Docker: remove login in + push to Dockerhub related steps
2 parents f9c98f4 + fc65ad5 commit 43c7d5b

File tree

1 file changed

+0
-130
lines changed

1 file changed

+0
-130
lines changed

.github/workflows/docker.yaml

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
workflow_dispatch: {}
44
push:
55
paths-ignore:
6-
- "helm/**"
76
- "*.md"
87
- "docs/**"
98

@@ -35,13 +34,6 @@ jobs:
3534
run: |
3635
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3736
38-
- name: Login to Docker Hub
39-
uses: docker/login-action@v3
40-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
41-
with:
42-
username: ${{ secrets.DOCKERHUB_USERNAME }}
43-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
44-
4537
- name: Set up Docker Buildx
4638
uses: docker/setup-buildx-action@v3
4739

@@ -55,15 +47,6 @@ jobs:
5547
cache-to: type=gha,mode=max
5648
outputs: type=image,name=${{ env.REGISTRY_NODE_IMAGE }},push-by-digest=true,name-canonical=true,push=false
5749

58-
- name: Push Docker image by digest
59-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
60-
uses: docker/build-push-action@v6
61-
with:
62-
context: .
63-
platforms: ${{ matrix.arch.platform }}
64-
cache-from: type=gha
65-
outputs: type=image,name=${{ env.REGISTRY_NODE_IMAGE }},push-by-digest=true,name-canonical=true,push=true
66-
6750
- name: Export digest
6851
run: |
6952
mkdir -p /tmp/digests
@@ -78,53 +61,7 @@ jobs:
7861
if-no-files-found: error
7962
retention-days: 1
8063

81-
merge-openmina-node-image:
82-
runs-on: ubuntu-latest
83-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
84-
needs:
85-
- build-openmina-node-image
86-
steps:
87-
- name: Download digests
88-
uses: actions/download-artifact@v4
89-
with:
90-
path: /tmp/digests
91-
pattern: node-digests-*
92-
merge-multiple: true
93-
94-
- name: Set up Docker Buildx
95-
uses: docker/setup-buildx-action@v3
96-
97-
- name: Docker meta
98-
id: meta
99-
uses: docker/metadata-action@v5
100-
with:
101-
images: ${{ env.REGISTRY_NODE_IMAGE }}
102-
# generate Docker tags based on the following events/attributes
103-
tags: |
104-
type=ref,event=branch
105-
type=sha,format=short
106-
type=semver,pattern={{version}},event=tag
107-
type=ref,event=tag
108-
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
109-
110-
- name: Login to Docker Hub
111-
uses: docker/login-action@v3
112-
with:
113-
username: ${{ secrets.DOCKERHUB_USERNAME }}
114-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
115-
116-
- name: Create manifest list and push
117-
working-directory: /tmp/digests
118-
run: |
119-
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
120-
$(printf '${{ env.REGISTRY_NODE_IMAGE }}@sha256:%s ' *)
121-
122-
- name: Inspect image
123-
run: |
124-
docker buildx imagetools inspect ${{ env.REGISTRY_NODE_IMAGE }}:${{ steps.meta.outputs.version }}
125-
12664
# Frontend
127-
12865
build-openmina-frontend-image:
12966
strategy:
13067
matrix:
@@ -145,13 +82,6 @@ jobs:
14582
- name: Git checkout
14683
uses: actions/checkout@v4
14784

148-
- name: Login to Docker Hub
149-
uses: docker/login-action@v3
150-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
151-
with:
152-
username: ${{ secrets.DOCKERHUB_USERNAME }}
153-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
154-
15585
- name: Set up Docker Buildx
15686
uses: docker/setup-buildx-action@v3
15787

@@ -167,17 +97,6 @@ jobs:
16797
cache-to: type=gha,mode=max
16898
outputs: type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=false
16999

170-
- name: Push Docker image by digest
171-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
172-
uses: docker/build-push-action@v6
173-
with:
174-
context: ./frontend
175-
platforms: ${{ matrix.arch.platform }}
176-
build-args: |
177-
BUILD_CONFIGURATION=${{ matrix.configuration.build_configuration }}
178-
cache-from: type=gha
179-
outputs: type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=true
180-
181100
- name: Export digest
182101
run: |
183102
mkdir -p /tmp/digests
@@ -191,52 +110,3 @@ jobs:
191110
path: /tmp/digests/*
192111
if-no-files-found: error
193112
retention-days: 1
194-
195-
merge-openmina-frontend-image:
196-
strategy:
197-
matrix:
198-
configuration:
199-
- build_configuration: production
200-
runs-on: ubuntu-latest
201-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
202-
needs:
203-
- build-openmina-frontend-image
204-
steps:
205-
- name: Download digests
206-
uses: actions/download-artifact@v4
207-
with:
208-
path: /tmp/digests
209-
pattern: frontend-${{ matrix.configuration.build_configuration }}-digests-*
210-
merge-multiple: true
211-
212-
- name: Set up Docker Buildx
213-
uses: docker/setup-buildx-action@v3
214-
215-
- name: Docker meta
216-
id: meta
217-
uses: docker/metadata-action@v5
218-
with:
219-
images: ${{ env.REGISTRY_FRONTEND_IMAGE }}
220-
tags: |
221-
type=ref,event=branch
222-
type=sha,format=short
223-
type=semver,pattern={{version}},event=tag
224-
type=ref,event=tag
225-
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
226-
type=raw,value=staging,enable=${{ github.ref_name == 'develop' }}
227-
228-
- name: Login to Docker Hub
229-
uses: docker/login-action@v3
230-
with:
231-
username: ${{ secrets.DOCKERHUB_USERNAME }}
232-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
233-
234-
- name: Create manifest list and push
235-
working-directory: /tmp/digests
236-
run: |
237-
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
238-
$(printf '${{ env.REGISTRY_FRONTEND_IMAGE }}@sha256:%s ' *)
239-
240-
- name: Inspect image
241-
run: |
242-
docker buildx imagetools inspect ${{ env.REGISTRY_FRONTEND_IMAGE }}:${{ steps.meta.outputs.version }}

0 commit comments

Comments
 (0)