Hi!
I've recently just used this action for a small application in production. One small improvement would be to fail the bash script completely if the initial command failed (i.e. due to typo, auth, invalid arguments). So I figured adding a set -e statement might help the user out, instead of "silently failing" and the rest of the GitHub Action proceeding as normal.
# /bin/bash
set -e
TAGS=$(doctl registry repository lt $1 --format Tag,UpdatedAt | tail -n +2 | sort -rk2 | awk '{print $1}' | grep -v latest | tail -n +$2 | tr '\n' ' ')
[[ -n $TAGS ]] && doctl registry repository dt $1 $TAGS --force
echo Tags removed: $TAGS
Thanks!
Hi!
I've recently just used this action for a small application in production. One small improvement would be to fail the bash script completely if the initial command failed (i.e. due to typo, auth, invalid arguments). So I figured adding a
set -estatement might help the user out, instead of "silently failing" and the rest of the GitHub Action proceeding as normal.Thanks!