diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 72a39bf..fd30963 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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