Skip to content

Commit c650b54

Browse files
authored
Merge pull request #21539 from crazy-max/gha-docker-login
gha: move docker login step up
2 parents a65dac8 + e6d3d21 commit c650b54

32 files changed

+223
-198
lines changed

content/guides/bun/configure-ci-cd.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,16 @@ to Docker Hub.
7979
build:
8080
runs-on: ubuntu-latest
8181
steps:
82-
-
83-
name: Login to Docker Hub
82+
- name: Login to Docker Hub
8483
uses: docker/login-action@v3
8584
with:
8685
username: ${{ vars.DOCKER_USERNAME }}
8786
password: ${{ secrets.DOCKERHUB_TOKEN }}
88-
-
89-
name: Set up Docker Buildx
87+
88+
- name: Set up Docker Buildx
9089
uses: docker/setup-buildx-action@v3
91-
-
92-
name: Build and push
90+
91+
- name: Build and push
9392
uses: docker/build-push-action@v6
9493
with:
9594
platforms: linux/amd64,linux/arm64

content/guides/cpp/configure-ci-cd.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and push
9193
uses: docker/build-push-action@v6
9294
with:

content/guides/dotnet/configure-ci-cd.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,16 @@ to Docker Hub.
9393
with:
9494
username: ${{ vars.DOCKER_USERNAME }}
9595
password: ${{ secrets.DOCKERHUB_TOKEN }}
96+
9697
- name: Set up Docker Buildx
9798
uses: docker/setup-buildx-action@v3
99+
98100
- name: Build and test
99101
uses: docker/build-push-action@v6
100102
with:
101103
target: build
102104
load: true
105+
103106
- name: Build and push
104107
uses: docker/build-push-action@v6
105108
with:

content/guides/golang/configure-ci-cd.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and push
9193
uses: docker/build-push-action@v6
9294
with:

content/guides/java/configure-ci-cd.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,16 @@ to Docker Hub.
8888
with:
8989
username: ${{ vars.DOCKER_USERNAME }}
9090
password: ${{ secrets.DOCKERHUB_TOKEN }}
91+
9192
- name: Set up Docker Buildx
9293
uses: docker/setup-buildx-action@v3
94+
9395
- name: Build and test
9496
uses: docker/build-push-action@v6
9597
with:
9698
target: test
9799
load: true
100+
98101
- name: Build and push
99102
uses: docker/build-push-action@v6
100103
with:

content/guides/nodejs/configure-ci-cd.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,20 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and test
9193
uses: docker/build-push-action@v6
9294
with:
9395
target: test
9496
load: true
97+
9598
- name: Build and push
9699
uses: docker/build-push-action@v6
97100
with:
98-
platforms: linux/amd64,linux/arm64/v8
101+
platforms: linux/amd64,linux/arm64
99102
push: true
100103
target: prod
101104
tags: ${{ vars.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest

content/guides/php/configure-ci-cd.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,16 @@ to Docker Hub.
9393
with:
9494
username: ${{ vars.DOCKER_USERNAME }}
9595
password: ${{ secrets.DOCKERHUB_TOKEN }}
96+
9697
- name: Set up Docker Buildx
9798
uses: docker/setup-buildx-action@v3
99+
98100
- name: Build and test
99101
uses: docker/build-push-action@v6
100102
with:
101103
target: test
102104
load: true
105+
103106
- name: Build and push
104107
uses: docker/build-push-action@v6
105108
with:

content/guides/python/configure-ci-cd.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and push
9193
uses: docker/build-push-action@v6
9294
with:

content/guides/r/configure-ci-cd.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and push
9193
uses: docker/build-push-action@v6
9294
with:

content/guides/ruby/configure-ci-cd.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ to Docker Hub.
8585
with:
8686
username: ${{ vars.DOCKER_USERNAME }}
8787
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
8889
- name: Set up Docker Buildx
8990
uses: docker/setup-buildx-action@v3
91+
9092
- name: Build and push
9193
uses: docker/build-push-action@v6
9294
with:
93-
platforms: linux/amd64
9495
push: true
9596
tags: ${{ vars.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest
9697
```

0 commit comments

Comments
 (0)