Skip to content

Commit fc65ad5

Browse files
committed
CI/docker: removing any step related to login or push to Dockerhub
1 parent 62f1b0a commit fc65ad5

File tree

1 file changed

+0
-129
lines changed

1 file changed

+0
-129
lines changed

.github/workflows/docker.yaml

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ jobs:
3434
run: |
3535
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3636
37-
- name: Login to Docker Hub
38-
uses: docker/login-action@v3
39-
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push' }}
40-
with:
41-
username: ${{ secrets.DOCKERHUB_USERNAME }}
42-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
43-
4437
- name: Set up Docker Buildx
4538
uses: docker/setup-buildx-action@v3
4639

@@ -54,15 +47,6 @@ jobs:
5447
cache-to: type=gha,mode=max
5548
outputs: type=image,name=${{ env.REGISTRY_NODE_IMAGE }},push-by-digest=true,name-canonical=true,push=false
5649

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

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

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

@@ -166,17 +97,6 @@ jobs:
16697
cache-to: type=gha,mode=max
16798
outputs: type=image,name=${{ env.REGISTRY_FRONTEND_IMAGE }},push-by-digest=true,name-canonical=true,push=false
16899

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

0 commit comments

Comments
 (0)