66
66
- name : Build image
67
67
run : |
68
68
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
70
70
docker buildx build --no-cache --build-arg MOD_VERSION=${MOD_VERSION} -t arm64v8-${{ github.sha }} --platform linux/arm64/v8 .
71
71
fi
72
72
78
78
DOCKERHUB_TAGS="${DOCKERHUB_TAGS} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${MOD_VERSION} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${MOD_VERSION}-${{ github.sha }}"
79
79
fi
80
80
echo "DOCKERHUB_TAGS=${DOCKERHUB_TAGS}" >> $GITHUB_ENV
81
- if [[ "${MULTI_ARCH}" == "true" ]]; then
81
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
82
82
for i in ${DOCKERHUB_TAGS}; do
83
83
docker tag ${{ github.sha }} ${i/:/:amd64-}
84
84
docker tag arm64v8-${{ github.sha }} ${i/:/:arm64v8-}
96
96
- name : Tag image (PR)
97
97
if : ${{ env.GITHUB_REPO == format('{0}/{1}', github.event.pull_request.base.repo.owner.login, github.event.pull_request.base.repo.name) }}
98
98
run : |
99
- if [[ "${MULTI_ARCH}" == "true" ]]; then
99
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
100
100
docker tag ${{ github.sha }} ${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
101
101
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
102
102
docker tag arm64v8-${{ github.sha }} ${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
@@ -128,7 +128,7 @@ jobs:
128
128
- name : Push tags to GitHub Container Registry (Commit)
129
129
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 }}
130
130
run : |
131
- if [[ "${MULTI_ARCH}" == "true" ]]; then
131
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
132
132
echo "Pushed the following images/tags to GHCR:" >> $GITHUB_STEP_SUMMARY
133
133
for i in ${DOCKERHUB_TAGS}; do
134
134
ighcr="${i/#/ghcr.io\/}"
@@ -158,7 +158,7 @@ jobs:
158
158
- name : Push tags to GitHub Container Registry (PR)
159
159
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 }}
160
160
run : |
161
- if [[ "${MULTI_ARCH}" == "true" ]]; then
161
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
162
162
docker push ghcr.io/${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
163
163
docker push ghcr.io/${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
164
164
echo "Pushed the following PR images/tags to GHCR:" >> $GITHUB_STEP_SUMMARY
@@ -193,7 +193,7 @@ jobs:
193
193
- name : Push tags to DockerHub (Commit)
194
194
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 }}
195
195
run : |
196
- if [[ "${MULTI_ARCH}" == "true" ]]; then
196
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
197
197
echo "Pushed the following images/tags to Docker Hub:" >> $GITHUB_STEP_SUMMARY
198
198
for i in ${DOCKERHUB_TAGS}; do
199
199
docker push ${i/:/:amd64-}
@@ -220,7 +220,7 @@ jobs:
220
220
- name : Push tags to DockerHub (PR)
221
221
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 }}
222
222
run : |
223
- if [[ "${MULTI_ARCH}" == "true" ]]; then
223
+ if [[ "${MULTI_ARCH,, }" == "true" ]]; then
224
224
docker push ${ENDPOINT}:amd64-pull_request_${{ github.event.pull_request.number }}
225
225
docker push ${ENDPOINT}:arm64v8-pull_request_${{ github.event.pull_request.number }}
226
226
echo "Pushed the following PR images/tags to Docker Hub:" >> $GITHUB_STEP_SUMMARY
0 commit comments