Update docker-image.yml

This commit is contained in:
Maciej Lebiest 2023-03-03 21:46:38 +01:00 committed by GitHub
parent 8c2f3c7602
commit 4c2ebf46a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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