Skip to content

Commit

Permalink
cleanup and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxMD committed Dec 27, 2024
1 parent bcbb643 commit f92572d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publishImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ on:
# release:
# types: [ published ]

# define repository actions vars to enable pushing to registries IE
# DOCKERHUB_SLUG: foxxmd/multi-scrobbler
# GHCR_SLUG: ghcr.io/foxxmd/multi-scrobbler
# define in GH Repository -> Actions -> Variables (or act .variables) to enable pushing to registries
# -- will only push to registries that are defined
# EX
# DOCKERHUB_SLUG=foxxmd/multi-scrobbler
# GHCR_SLUG=ghcr.io/foxxmd/multi-scrobbler

jobs:
test:
Expand Down Expand Up @@ -56,6 +58,7 @@ jobs:
# list all registries to push to and join all non-empty with comma
# https://unix.stackexchange.com/a/693165/116849
# https://stackoverflow.com/a/9429887/1469797
strings=("${{vars.DOCKERHUB_SLUG}}" "${{vars.GHCR_SLUG}}")
for i in ${!strings[@]}; do [[ -z ${strings[i]} ]] && unset strings[i]; done
joined_string=$(IFS=, ; echo "${strings[*]}")
Expand Down

0 comments on commit f92572d

Please sign in to comment.