Skip to content

Commit 616df42

Browse files
authored
Update docker-multiarch.yml
1 parent 98ffa2d commit 616df42

File tree

1 file changed

+12
-53
lines changed

1 file changed

+12
-53
lines changed

.github/workflows/docker-multiarch.yml

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,18 @@ jobs:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
2222

23-
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v3
25-
2623
- name: Login to Docker Hub
2724
uses: docker/login-action@v3
2825
with:
2926
username: ${{ vars.DOCKERHUB_USERNAME }}
3027
password: ${{ secrets.DOCKERHUB_TOKEN }}
3128

32-
- name: Docker meta
33-
id: meta
34-
uses: docker/metadata-action@v5
35-
with:
36-
# list of Docker images to use as base name for tags
37-
images: |
38-
${{ vars.DOCKERHUB_USERNAME }}/service
39-
# Docker tags to generate
40-
tags: |
41-
type=raw,priority=800,value=${{ github.event.inputs.docker_tag }}-arm64
42-
43-
- name: Build and push
44-
uses: docker/build-push-action@v6
45-
with:
46-
context: .
47-
push: true
48-
# platforms: linux/arm64
49-
# See https://github.com/dotnet/dotnet-docker/blob/main/README.sdk.md#full-tag-listing
50-
build-args: |
51-
BUILD_IMAGE_TAG=9.0-noble-arm64v8
52-
RUN_IMAGE_TAG=9.0-alpine-arm64v8
53-
labels: ${{ steps.meta.outputs.labels }}
54-
tags: ${{ steps.meta.outputs.tags }}
55-
29+
- name: Build ARM Docker image
30+
run: |
31+
docker build --push --platform linux/arm64 \
32+
--build-arg BUILD_IMAGE_TAG=9.0-noble-arm64 \
33+
--build-arg RUN_IMAGE_TAG=9.0-alpine-arm64 \
34+
--tag "${{ vars.DOCKERHUB_USERNAME }}/service:${{ github.event.inputs.docker_tag }}-arm64" .
5635
5736
amd64:
5837
runs-on: ubuntu-latest
@@ -64,35 +43,15 @@ jobs:
6443
- name: Checkout code
6544
uses: actions/checkout@v4
6645

67-
- name: Set up Docker Buildx
68-
uses: docker/setup-buildx-action@v3
69-
7046
- name: Login to Docker Hub
7147
uses: docker/login-action@v3
7248
with:
7349
username: ${{ vars.DOCKERHUB_USERNAME }}
7450
password: ${{ secrets.DOCKERHUB_TOKEN }}
7551

76-
- name: Docker meta
77-
id: meta
78-
uses: docker/metadata-action@v5
79-
with:
80-
# list of Docker images to use as base name for tags
81-
images: |
82-
${{ vars.DOCKERHUB_USERNAME }}/service
83-
# Docker tags to generate
84-
tags: |
85-
type=raw,priority=800,value=${{ github.event.inputs.docker_tag }}-amd64
86-
87-
- name: Build and push
88-
uses: docker/build-push-action@v6
89-
with:
90-
context: .
91-
push: true
92-
# platforms: linux/amd64
93-
# See https://github.com/dotnet/dotnet-docker/blob/main/README.sdk.md#full-tag-listing
94-
build-args: |
95-
BUILD_IMAGE_TAG=9.0-noble-amd64
96-
RUN_IMAGE_TAG=9.0-alpine-amd64
97-
labels: ${{ steps.meta.outputs.labels }}
98-
tags: ${{ steps.meta.outputs.tags }}
52+
- name: Build AMD Docker image
53+
run: |
54+
docker build --push --platform linux/amd64 \
55+
--build-arg BUILD_IMAGE_TAG=9.0-noble-amd64 \
56+
--build-arg RUN_IMAGE_TAG=9.0-alpine-amd64 \
57+
--tag "${{ vars.DOCKERHUB_USERNAME }}/service:${{ github.event.inputs.docker_tag }}-amd64" .

0 commit comments

Comments
 (0)