Update docker-image.yml
This commit is contained in:
parent
587a086f19
commit
deb1299074
1 changed files with 7 additions and 5 deletions
12
.github/workflows/docker-image.yml
vendored
12
.github/workflows/docker-image.yml
vendored
|
@ -3,6 +3,8 @@ name: Docker Image CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
schedule:
|
||||||
|
- cron: '30 4 * * 0,2,4'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -16,13 +18,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker build . --file Dockerfile --tag nvim:latest
|
run: docker build . --file Dockerfile --tag neovim:latest
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME="nvim"
|
IMAGE_NAME="neovim"
|
||||||
IMAGE_ID=ghcr.io/szwendacz99/$IMAGE_NAME
|
IMAGE_ID=ghcr.io/szwendacz99/$IMAGE_NAME
|
||||||
TAG=$(date +"%Y-%m-%dT%H-%M")
|
TAG=$(date +"%Y-%m-%d")
|
||||||
docker tag $IMAGE_NAME:latest $IMAGE_ID:$TAG
|
docker push $IMAGE_ID:latest
|
||||||
docker push $IMAGE_ID:$TAG
|
docker tag $IMAGE_ID:latest $IMAGE_ID:$TAG
|
||||||
|
|
Loading…
Reference in a new issue