@@ -179,12 +179,6 @@ jobs:
179
179
(export PATH=$(pwd)/build/bin:$PATH; (cd upstream && bash -x update-pkgs.sh) && sed -i.bak '/upstream/d' .dockerignore && echo "/:toolchain:/i ADD upstream upstream" | sed -i.bak -f - build/bin/write-dockerfile.sh && git diff)
180
180
if : inputs.upstream_artifact
181
181
182
- - name : Merge CI fixes from sagemath/sage
183
- run : |
184
- .ci/merge-fixes.sh
185
- env :
186
- GH_TOKEN : ${{ github.token }}
187
-
188
182
- name : Try to login to ghcr.io
189
183
if : inputs.docker_push_repository != ''
190
184
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
@@ -197,6 +191,9 @@ jobs:
197
191
echo "DOCKER_PUSH_REPOSITORY=$(echo ${{ inputs.docker_push_repository }} | tr "[:upper:]" "[:lower:]")" >> $GITHUB_ENV
198
192
echo "DOCKER_CONFIG_FILE=$HOME/.docker/config.json" >> $GITHUB_ENV
199
193
fi
194
+ # This line needs to be run before the step "Merge CI fixes from sagemath/sage".
195
+ DOCKER_TAG="$(git describe --dirty --always)"
196
+ echo "DOCKER_TAG=$DOCKER_TAG" >> $GITHUB_ENV
200
197
# From the docker documentation via .ci/update-env.sh:
201
198
# "A tag name must be valid ASCII and may
202
199
# contain lowercase and uppercase letters, digits, underscores, periods and
@@ -211,6 +208,15 @@ jobs:
211
208
EXTRA_DOCKER_TAGS="dev $EXTRA_DOCKER_TAGS";;
212
209
esac
213
210
echo "EXTRA_DOCKER_TAGS=$EXTRA_DOCKER_TAGS" >> $GITHUB_ENV
211
+
212
+ - name : Merge CI fixes from sagemath/sage
213
+ # This step needs to happen after the commit sha is put in DOCKER_TAG
214
+ # so that multi-stage builds can work correctly.
215
+ run : |
216
+ .ci/merge-fixes.sh
217
+ env :
218
+ GH_TOKEN : ${{ github.token }}
219
+
214
220
- name : Configure and build Sage distribution within a Docker container
215
221
run : |
216
222
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg NUMPROC=4 --build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
0 commit comments