Skip to content

Commit f1327e8

Browse files
committed
make MULTI_ARCH case insensitive
1 parent 67fdb70 commit f1327e8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/docker-mod-builder.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Build image
6767
run: |
6868
docker buildx build --no-cache --build-arg MOD_VERSION=${MOD_VERSION} -t ${{ github.sha }} --platform linux/amd64 .
69-
if [[ "${MULTI_ARCH}" == "true" ]]; then
69+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
7070
docker buildx build --no-cache --build-arg MOD_VERSION=${MOD_VERSION} -t arm64v8-${{ github.sha }} --platform linux/arm64/v8 .
7171
fi
7272
@@ -78,7 +78,7 @@ jobs:
7878
DOCKERHUB_TAGS="${DOCKERHUB_TAGS} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${MOD_VERSION} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${MOD_VERSION}-${{ github.sha }}"
7979
fi
8080
echo "DOCKERHUB_TAGS=${DOCKERHUB_TAGS}" >> $GITHUB_ENV
81-
if [[ "${MULTI_ARCH}" == "true" ]]; then
81+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
8282
for i in ${DOCKERHUB_TAGS}; do
8383
docker tag ${{ github.sha }} ${i/:/:amd64-}
8484
docker tag arm64v8-${{ github.sha }} ${i/:/:arm64v8-}
@@ -96,7 +96,7 @@ jobs:
9696
- name: Tag image (PR)
9797
if: ${{ env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name) }}
9898
run: |
99-
if [[ "${MULTI_ARCH}" == "true" ]]; then
99+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
100100
docker tag ${{ github.sha }} ${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
101101
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
102102
docker tag arm64v8-${{ github.sha }} ${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
@@ -128,7 +128,7 @@ jobs:
128128
- name: Push tags to GitHub Container Registry (Commit)
129129
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.GITHUB_REPO == github.repository && env.CR_USER && env.CR_PAT }}
130130
run: |
131-
if [[ "${MULTI_ARCH}" == "true" ]]; then
131+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
132132
echo "Pushed the following images/tags to GHCR:" >> $GITHUB_STEP_SUMMARY
133133
for i in ${DOCKERHUB_TAGS}; do
134134
ighcr="${i/#/ghcr.io\/}"
@@ -158,7 +158,7 @@ jobs:
158158
- name: Push tags to GitHub Container Registry (PR)
159159
if: ${{ env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name) && env.CR_USER && env.CR_PAT }}
160160
run: |
161-
if [[ "${MULTI_ARCH}" == "true" ]]; then
161+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
162162
docker push ghcr.io/${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
163163
docker push ghcr.io/${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
164164
echo "Pushed the following PR images/tags to GHCR:" >> $GITHUB_STEP_SUMMARY
@@ -193,7 +193,7 @@ jobs:
193193
- name: Push tags to DockerHub (Commit)
194194
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.GITHUB_REPO == github.repository && env.DOCKERUSER && env.DOCKERPASS }}
195195
run: |
196-
if [[ "${MULTI_ARCH}" == "true" ]]; then
196+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
197197
echo "Pushed the following images/tags to Docker Hub:" >> $GITHUB_STEP_SUMMARY
198198
for i in ${DOCKERHUB_TAGS}; do
199199
docker push ${i/:/:amd64-}
@@ -220,7 +220,7 @@ jobs:
220220
- name: Push tags to DockerHub (PR)
221221
if: ${{ env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name) && env.DOCKERUSER && env.DOCKERPASS }}
222222
run: |
223-
if [[ "${MULTI_ARCH}" == "true" ]]; then
223+
if [[ "${MULTI_ARCH,,}" == "true" ]]; then
224224
docker push ${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
225225
docker push ${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
226226
echo "Pushed the following PR images/tags to Docker Hub:" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy