78
78
echo "tag=${TAG}" >>"$GITHUB_OUTPUT"
79
79
80
80
# ##################################
81
- # Build image locally for testing #
81
+ # Build images locally for testing #
82
82
# ##################################
83
- - name : Build image (quick)
83
+ - name : Build images (quick)
84
84
if : " contains(github.event.head_commit.message, 'quick build')"
85
85
id : docker_build_quick
86
86
shell : bash
94
94
MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}"
95
95
echo "Reusing previously built image as base for quick build: ${MEGA_LINTER_BASE_IMAGE}"
96
96
fi
97
- docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
97
+ docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
98
+ docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
99
+ docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
98
100
timeout-minutes : 60
99
101
100
102
# #########################
@@ -109,15 +111,15 @@ jobs:
109
111
IMAGE_REPO : oxsecurity/megalinter
110
112
IMAGE_VERSION : ${{steps.image_tag.outputs.tag}}
111
113
DOCKERFILE_PATH : Dockerfile-quick
112
- DOCKER_BUILD_PLATFORMS : linux/amd64
114
+ DOCKER_BUILD_PLATFORMS : linux/amd64,linux/arm64
113
115
REGISTRY : Docker
114
116
shell : bash
115
117
run : .automation/upload-docker.sh || true
116
118
117
119
# ######################################
118
- # Build image (full for forked repos) #
120
+ # Build images (full for forked repos) #
119
121
# ######################################
120
- - name : Build image (full from forks)
122
+ - name : Build images (full from forks)
121
123
if : |
122
124
(
123
125
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) ||
@@ -127,7 +129,10 @@ jobs:
127
129
!contains(github.event.head_commit.message, 'quick build')
128
130
id : docker_build
129
131
shell : bash
130
- run : docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
132
+ run : |
133
+ docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
134
+ docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
135
+ docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
131
136
timeout-minutes : 90
132
137
133
138
# ###################################
@@ -148,7 +153,7 @@ jobs:
148
153
IMAGE_REPO : oxsecurity/megalinter
149
154
IMAGE_VERSION : ${{steps.image_tag.outputs.tag}}
150
155
DOCKERFILE_PATH : Dockerfile
151
- DOCKER_BUILD_PLATFORMS : linux/amd64
156
+ DOCKER_BUILD_PLATFORMS : linux/amd64,linux/arm64
152
157
REGISTRY : Docker
153
158
shell : bash
154
159
run : .automation/upload-docker.sh
0 commit comments