Skip to content

Commit

Permalink
build: add post push hook for client (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas authored and derevnjuk committed Jan 18, 2023
1 parent a987e5e commit 860d17c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hooks/post_push
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
TIMESTAMP=$(date +%Y%m%d%H%M%S)
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-$SOURCE_COMMIT-$TIMESTAMP
docker push $DOCKER_REPO:$SOURCE_BRANCH-$SOURCE_COMMIT-$TIMESTAMP
GIT_SHA=$(echo $SOURCE_COMMIT | cut -b 1-6)
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-$GIT_SHA-$TIMESTAMP
docker push $DOCKER_REPO:$SOURCE_BRANCH-$GIT_SHA-$TIMESTAMP
5 changes: 5 additions & 0 deletions public/hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
TIMESTAMP=$(date +%Y%m%d%H%M%S)
GIT_SHA=$(echo $SOURCE_COMMIT | cut -b 1-6)
docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_BRANCH-$GIT_SHA-$TIMESTAMP
docker push $DOCKER_REPO:$SOURCE_BRANCH-$GIT_SHA-$TIMESTAMP

0 comments on commit 860d17c

Please sign in to comment.