File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,19 @@ TAG="${INPUT_TAG:-${GITHUB_REF#refs/tags/}}" # v1.2.3
7
7
MINOR=" ${TAG% .* } " # v1.2
8
8
MAJOR=" ${MINOR% .* } " # v1
9
9
MESSAGE=" Release ${TAG} "
10
+ IMAGE=" ghcr.io/$GITHUB_REPOSITORY :$TAG "
10
11
11
- # Build Docker Image
12
- docker build -t " ghcr.io/$GITHUB_REPOSITORY :$TAG " .
12
+ # Login to GHCR
13
13
printenv GITHUB_TOKEN | docker login ghcr.io --username " ${GITHUB_REPOSITORY%/* } " --password-stdin
14
- docker push " ghcr.io/$GITHUB_REPOSITORY :$TAG "
14
+
15
+ # Build Docker Image
16
+ # Build and push multi-platform image
17
+ docker buildx build \
18
+ --platform linux/amd64,linux/arm64 \
19
+ --tag " $IMAGE " \
20
+ --push \
21
+ .
22
+
15
23
docker logout ghcr.io
16
24
17
25
# Set up Git.
Original file line number Diff line number Diff line change 10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- uses : actions/checkout@v4
13
+
14
+ - name : Set up QEMU for ARM Emulation
15
+ uses : docker/setup-qemu-action@v3
16
+
17
+ - name : Set up Docker Buildx
18
+ uses : docker/setup-buildx-action@v3
19
+ with :
20
+ use : true
21
+
13
22
- name : Build the Docker image
14
- run : docker build . --file Dockerfile --tag "reviewdog-actionlint:$(date +%s)"
23
+ run : |
24
+ docker buildx build \
25
+ --platform linux/amd64,linux/arm64 \
26
+ --tag "reviewdog-actionlint:$(date +%s)" \
27
+ --file Dockerfile \
28
+ .
Original file line number Diff line number Diff line change 36
36
with :
37
37
dry_run : true
38
38
39
+ - name : Set up QEMU for ARM Emulation
40
+ uses : docker/setup-qemu-action@v3
41
+
42
+ - name : Set up Docker Buildx
43
+ uses : docker/setup-buildx-action@v3
44
+ with :
45
+ use : true
46
+
39
47
# build the Docker Image
40
48
- name : build the Docker Image
41
49
if : " ${{ !steps.bumpr.outputs.skip }}"
You can’t perform that action at this time.
0 commit comments