Skip to content

Commit 375702b

Browse files
committed
Group Docker steps in collapsible sections.
1 parent 490f77a commit 375702b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/Pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ jobs:
125125
126126
- name: 🔑 Login and push '${{ steps.variables.outputs.specific_image }}' to Docker Hub
127127
run: |
128+
DockerImageSizeUncompressed() {
129+
docker image inspect $1 --format='{{.Size}}' | numfmt --to=iec --format '%.2f'
130+
}
131+
128132
printf "%s\n" "Login at Docker Hub ..."
129133
printf "%s\n" "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ vars.DOCKERHUB_USERNAME }} --password-stdin
130134

Docker.buildx.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,24 @@ Pattern_CANCELED='#[0-9]+ CANCELED'
125125
Pattern_Tagging='#[0-9]+ naming to (.*?) done'
126126
Pattern_MIKTEX='#[0-9]+ [0-9]+\.[0-9]+ Installing package'
127127

128+
group=0
128129
while IFS='\n' read -r line; do
129130
if [[ "${line}" =~ $Pattern_FROM ]]; then
130-
printf "%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
131+
printf "::group::%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
132+
group=1
131133
elif [[ "${line}" =~ $Pattern_RUN ]]; then
132-
printf "%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
134+
printf "::group::%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
135+
group=1
133136
elif [[ "${line}" =~ $Pattern_COPY ]]; then
134137
printf "%s\n" "${INDENT}${ANSI_LIGHT_CYAN}${line}${ANSI_NOCOLOR}"
135138
elif [[ "${line}" =~ $Pattern_LABEL_ENV ]]; then
136139
printf "%s\n" "${INDENT}${ANSI_BLUE}${line}${ANSI_NOCOLOR}"
137140
elif [[ "${line}" =~ $Pattern_DONE ]]; then
141+
if [[ $group -eq 1 ]]; then
142+
printf "::endgroup::\n"
143+
fi
138144
printf "%s\n" "${INDENT}${ANSI_GREEN}${line}${ANSI_NOCOLOR}"
145+
group=0
139146
elif [[ "${line}" =~ $Pattern_ERROR ]]; then
140147
printf "%s\n" "${INDENT}${ANSI_LIGHT_RED}${line}${ANSI_NOCOLOR}"
141148
elif [[ "${line}" =~ $Pattern_CANCELED ]]; then

0 commit comments

Comments
 (0)