Skip to content

Commit 3dfb822

Browse files
committed
Add missing "then"
Adds missing "then" in quicktest.yaml Fix debug print information Clean up mamba build logs in Docker build (-qy)
1 parent feef794 commit 3dfb822

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

.github/workflows/quicktest.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ jobs:
6161
env:
6262
GH_TOKEN: ${{ github.token }}
6363
run: |
64-
echo "::group::Debug information"
65-
echo "Workflow: ${{ github.workflow }}"
66-
echo "Action: ${{ github.event.action }}"
67-
if [[ "${{ github.event_name }}" == "pull_request" ]]
68-
echo "PR: ${{ github.event.number }}"
69-
echo "Event Triggered by: ${{ github.event.sender.login }}"
70-
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]
71-
echo "Inputs"
72-
cat <<EOF
73-
${{ toJSON(inputs) }}
74-
EOF
75-
fi
76-
echo "::endgroup::"
77-
h1="Accept: application/vnd.github+json"
78-
h2="X-GitHub-Api-Version: 2022-11-28"
64+
# Debug information
65+
# Workflow: ${{ github.workflow }}
66+
# Event Name: ${{ github.event_name }}
67+
# Action: ${{ github.event.action }}
68+
# pull_request-Event
69+
# PR: ${{ github.event.number }}
70+
# Event Triggered by: ${{ github.event.sender.login }}
71+
# workflow_dispatch-Event
72+
# Inputs:
73+
cat > /dev/null <<ENDOFINPUTS
74+
${{ toJSON(inputs) }}
75+
ENDOFINPUTS
76+
77+
gh_header=(-H "Accept: application/vnd.github+json"
78+
(-H "X-GitHub-Api-Version: 2022-11-28")
7979
if [[ "${{ github.event_name }}" == "pull_request" ]]
8080
then
8181
if [[ "${{ github.event.action }}" != "labeled" ]] && [[ "${{ github.event.action }}" != "unlabeled" ]]
@@ -94,8 +94,8 @@ jobs:
9494
echo "DOCKER_IMAGE=build-cached" >> $GITHUB_OUTPUT
9595
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]
9696
then
97-
# the inputs context is only useful/set in the workflow dispatch event case
98-
if [[ "${{ toJSON(inputs) }}" == "{}" ]] || [[ "${{ inputs.docker-image }}" == "" ]] ; then
97+
# the inputs context is only useful/set in the workflow dispatch event case
98+
if [[ "${{ inputs.docker-image }}" == "" ]] ; then
9999
echo "DOCKER_IMAGE=build-cached" > $GITHUB_OUTPUT
100100
else
101101
echo "DOCKER_IMAGE=${{ inputs.docker-image }}" > $GITHUB_OUTPUT
@@ -105,7 +105,7 @@ jobs:
105105
echo "This workflow is not defined for the event ${{ github.event_name }}!"
106106
exit 1
107107
fi
108-
if ! gh api -H "$h1" -H "$h2" /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}
108+
if ! gh api "${gh_header[@]}" /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}
109109
then
110110
echo "Only collaborators explicitly listed as collaborators can trigger this workflow!"
111111
echo "CONTINUE=false" >> $GITHUB_OUTPUT

Docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ COPY ./env/fastsurfer.yml ./Docker/conda_pack.sh ./Docker/install_env.py /instal
9494
ARG DEBUG=false
9595
RUN python /install/install_env.py -m base -i /install/fastsurfer.yml \
9696
-o /install/base-env.yml && \
97-
mamba env create -f "/install/base-env.yml" | tee /install/env-create.log ; \
97+
mamba env create -qy -f "/install/base-env.yml" | tee /install/env-create.log ; \
9898
if [ "${DEBUG}" != "true" ]; then \
9999
rm /install/base-env.yml ; \
100100
fi
@@ -106,12 +106,12 @@ ARG DEVICE=cu118
106106
# install additional packages for cuda/rocm/cpu
107107
RUN python /install/install_env.py -m ${DEVICE} -i /install/fastsurfer.yml \
108108
-o /install/${DEVICE}-env.yml && \
109-
mamba env update -n "fastsurfer" -f "/install/${DEVICE}-env.yml" \
109+
mamba env update -q -n "fastsurfer" -f "/install/${DEVICE}-env.yml" \
110110
| tee /install/env-update.log && \
111111
/install/conda_pack.sh "fastsurfer" && \
112112
echo "DEBUG=$DEBUG\nDEVICE=$DEVICE\n" > /install/build_conda.args ; \
113113
if [ "${DEBUG}" != "true" ]; then \
114-
mamba env remove -n "fastsurfer" && \
114+
mamba env remove -qy -n "fastsurfer" && \
115115
rm -R /install ; \
116116
fi
117117

0 commit comments

Comments
 (0)