Skip to content

Commit 390241d

Browse files
committed
ci: docker push if branch is develop
1 parent 45f968a commit 390241d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ jobs:
206206
docker logs piping
207207
# Delete container
208208
docker rm -f piping
209+
- name: Push if branch is develop
210+
if: github.ref == 'refs/heads/develop'
211+
run: |
212+
set -eu
213+
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u nwtgck --password-stdin
214+
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
215+
docker tag piping-server-rust nwtgck/piping-server-rust:${GIT_BRANCH}
216+
docker push nwtgck/piping-server-rust:${GIT_BRANCH}
209217
210218
release_if_tag_exits:
211219
needs:

0 commit comments

Comments
 (0)