Skip to content

Commit

Permalink
Merge pull request #3 from shizunge/development
Browse files Browse the repository at this point in the history
Update lib-common
  • Loading branch information
shizunge authored Jan 30, 2024
2 parents 50c0ddf + 37c31b1 commit 53bf301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
${{ github.repository }}-development
ghcr.io/${{ github.repository }}-development
tags: |
type=raw,value=dev-{{date 'X'}}
type=raw,value=development
type=raw,value=latest
type=ref,event=branch
type=edge,branch=main
- name: Build and push
Expand Down
3 changes: 2 additions & 1 deletion src/lib-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ time_elapsed_since() {
_time_elapsed_between "$(date +%s)" "${START_TIME}"
}

add_uniq_to_list() {
add_unique_to_list() {
local OLD_LIST="${1}"
local NEW_ITEM="${2}"
[ -z "${OLD_LIST}" ] && echo "${NEW_ITEM}" && return 0
echo -e "${OLD_LIST}\n${NEW_ITEM}" | sort | uniq
}

Expand Down

0 comments on commit 53bf301

Please sign in to comment.