From 4c2ebf46a6546b9052ddb5ea4d17ae9a9978cb1a Mon Sep 17 00:00:00 2001 From: Maciej Lebiest <68295743+Szwendacz99@users.noreply.github.com> Date: Fri, 3 Mar 2023 21:46:38 +0100 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 816a1d8..90bdb1a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -16,12 +16,13 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:latest + run: docker build . --file Dockerfile --tag nvim:latest - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin - name: Push image run: | + IMAGE_NAME="nvim" IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME TAG=$(date +"%Y-%m-%dT%H-%M") - docker tag $IMAGE_NAME $IMAGE_ID:$TAG + docker tag $IMAGE_NAME:latest $IMAGE_ID:$TAG docker push $IMAGE_ID:$TAG