Skip to content

Commit

Permalink
Group Docker steps in collapsible sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Dec 27, 2024
1 parent 490f77a commit 375702b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ jobs:
- name: 🔑 Login and push '${{ steps.variables.outputs.specific_image }}' to Docker Hub
run: |
DockerImageSizeUncompressed() {
docker image inspect $1 --format='{{.Size}}' | numfmt --to=iec --format '%.2f'
}
printf "%s\n" "Login at Docker Hub ..."
printf "%s\n" "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ vars.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
11 changes: 9 additions & 2 deletions Docker.buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,24 @@ Pattern_CANCELED='#[0-9]+ CANCELED'
Pattern_Tagging='#[0-9]+ naming to (.*?) done'
Pattern_MIKTEX='#[0-9]+ [0-9]+\.[0-9]+ Installing package'

group=0
while IFS='\n' read -r line; do
if [[ "${line}" =~ $Pattern_FROM ]]; then
printf "%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
printf "::group::%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
group=1
elif [[ "${line}" =~ $Pattern_RUN ]]; then
printf "%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
printf "::group::%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
group=1
elif [[ "${line}" =~ $Pattern_COPY ]]; then
printf "%s\n" "${INDENT}${ANSI_LIGHT_CYAN}${line}${ANSI_NOCOLOR}"
elif [[ "${line}" =~ $Pattern_LABEL_ENV ]]; then
printf "%s\n" "${INDENT}${ANSI_BLUE}${line}${ANSI_NOCOLOR}"
elif [[ "${line}" =~ $Pattern_DONE ]]; then
if [[ $group -eq 1 ]]; then
printf "::endgroup::\n"
fi
printf "%s\n" "${INDENT}${ANSI_GREEN}${line}${ANSI_NOCOLOR}"
group=0
elif [[ "${line}" =~ $Pattern_ERROR ]]; then
printf "%s\n" "${INDENT}${ANSI_LIGHT_RED}${line}${ANSI_NOCOLOR}"
elif [[ "${line}" =~ $Pattern_CANCELED ]]; then
Expand Down

0 comments on commit 375702b

Please sign in to comment.