Skip to content

Commit 75edb30

Browse files
committed
push images on workflow_dispatch
1 parent 3a4d72d commit 75edb30

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

push.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
[[ $DEBUG = true ]] && set -x
44

5-
if [[ $GITHUB_EVENT_NAME != push && $GITHUB_EVENT_NAME != schedule ]]; then
6-
exit 0
7-
fi
8-
if [[ $GITHUB_EVENT_NAME == push && $GITHUB_REF != "refs/heads/master" ]]; then
9-
exit 0
10-
fi
5+
case $GITHUB_EVENT_NAME in
6+
push|schedule|workflow_dispatch)
7+
if [[ $GITHUB_REF != "refs/heads/master" ]]; then
8+
exit 0
9+
fi
10+
;;
11+
*)
12+
exit 0
13+
;;
14+
esac
1115

1216
[[ -z $SKIP_LOGIN ]] && docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
1317

1418
for image in $(docker images --filter=label=org.ustcmirror.images=true --format="{{.Repository}}:{{.Tag}}")
1519
do
16-
docker push "$image"
17-
echo "$image pushed"
20+
docker push "$image" && echo "$image pushed"
1821
done
1922

0 commit comments

Comments
 (0)