Skip to content

Commit 0986ea8

Browse files
- Fine grained detail.
1 parent 9e015fa commit 0986ea8

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,43 @@ jobs:
13711371
- name: Prepare
13721372
run: |
13731373
platform=${{ matrix.platform }}
1374-
echo "PLATFORM_PAIR=${platform//\//-}" >> "${GITHUB_ENV}"
1374+
echo "PLATFORM_PAIR=${platform//\//-}" >> "${GITHUB_ENV}"
1375+
1376+
1377+
- name: Image env sanitize
1378+
run: |
1379+
BUILD_IMAGE_REQUIRED="true"
1380+
PUSH_IMAGE_REQUIRED="false"
1381+
if [ "$( grep '^build-elide.*' <<< '${{ github.ref_name }}' )" != "" ]; then
1382+
BUILD_IMAGE_REQUIRED="false"
1383+
fi
1384+
# shellcheck disable=SC2235
1385+
if ( \
1386+
[ "${{ github.repository }}" = "stackql/stackql" ] \
1387+
|| [ "${{ github.repository }}" != "stackql/stackql-devel" ] \
1388+
) \
1389+
&& [ "${{ vars.CI_SKIP_DOCKER_PUSH }}" != "true" ] \
1390+
&& [ "$( grep '^build-elide.*' <<< '${{ github.ref_name }}' )" = "" ] \
1391+
&& ( \
1392+
[ "${{ github.ref_type }}" = "branch" ] \
1393+
&& [ "${{ github.ref_name }}" = "main" ] \
1394+
&& [ "${{ github.event_name }}" = "push" ] \
1395+
) \
1396+
|| ( \
1397+
[ "${{ github.ref_type }}" = "tag" ] \
1398+
&& [ "$( grep '^build-release.*' <<< '${{ github.ref_name }}' )" != "" ] \
1399+
); \
1400+
then
1401+
PUSH_IMAGE_REQUIRED="true"
1402+
fi
1403+
if [ "${{ matrix.platform }}" == "linux/arm64" ] && [ "${PUSH_IMAGE_REQUIRED}" = "false" ]; then
1404+
BUILD_IMAGE_REQUIRED="false"
1405+
fi
1406+
{
1407+
echo "IMAGE_PLATFORM_SAN=$( sed 's/\//_/g' <<< '${{ matrix.platform }}' )";
1408+
echo "PUSH_IMAGE_REQUIRED=${PUSH_IMAGE_REQUIRED}";
1409+
echo "BUILD_IMAGE_REQUIRED=${BUILD_IMAGE_REQUIRED}";
1410+
} | tee -a "${GITHUB_ENV}"
13751411
13761412
- name: Docker meta
13771413
id: meta

0 commit comments

Comments
 (0)