Skip to content

Commit

Permalink
fix cd
Browse files Browse the repository at this point in the history
  • Loading branch information
YevheniiSemendiak committed Jul 29, 2021
1 parent 01a2ddf commit 3456f88
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
IMAGE_NAME: neuromation/web-shell
IMAGE_TAG: ${GITHUB_REF#refs/tags/}

steps:
- name: Checkout commit
Expand All @@ -73,13 +72,13 @@ jobs:

- name: Build image
run: |
docker build -t $IMAGE_NAME:$IMAGE_TAG .
docker build -t $IMAGE_NAME .
- name: Push image
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
run: |
set -x
for tag in $(echo "latest,$IMAGE_TAG" | tr "," " ")
for tag in $(echo "latest,${GITHUB_REF#refs/tags/}" | tr "," " ")
do
docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:$tag && docker push $IMAGE_NAME:$tag
docker tag $IMAGE_NAME $IMAGE_NAME:$tag && docker push $IMAGE_NAME:$tag
done

0 comments on commit 3456f88

Please sign in to comment.