Skip to content

Commit

Permalink
chore(ci): adds post push hook
Browse files Browse the repository at this point in the history
  • Loading branch information
garethflowers committed Oct 16, 2019
1 parent 8f4b89c commit 789c136
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [[ $DOCKER_TAG =~ ^(([0-9]+).[0-9]+).[0-9]+$ ]]
then
docker tag $IMAGE_NAME $DOCKER_REPO:${BASH_REMATCH[1]}
docker push $DOCKER_REPO:${BASH_REMATCH[1]}
docker tag $IMAGE_NAME $DOCKER_REPO:${BASH_REMATCH[2]}
docker push $DOCKER_REPO:${BASH_REMATCH[2]}
docker tag $IMAGE_NAME $DOCKER_REPO:latest
docker push $DOCKER_REPO:latest
fi
curl --request POST https://hooks.microbadger.com/images/garethflowers/mediawiki-ldap/nE-ecjjtvisVdmZcJ21nacrxk6I= || true

0 comments on commit 789c136

Please sign in to comment.