nvim/.github/workflows/oci-image.yml

38 lines
1.2 KiB
YAML
Raw Normal View History

2023-10-28 07:32:29 +00:00
name: Build neovim image
run-name: Build Neovim image yay
on:
push:
branches: [ "main" ]
schedule:
2023-10-28 07:32:29 +00:00
- cron: '30 3 */5 * *'
jobs:
2023-10-28 07:32:29 +00:00
build-neovim:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: docker build . --file Dockerfile --tag neovim:latest
- name: upload image
#env:
#PACKAGES_USERNAME: ${{ secrets.PACKAGES_USERNAME }}
#PACKAGES_PASSWD: ${{ secrets.PACKAGES_PASSWD }}
run: docker login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" gitea.maciej.cloud
#- run: docker push gitea.maciej.cloud/packages/neovim
- name: Push image
run: |
IMAGE_NAME="neovim"
IMAGE_ID="gitea.maciej.cloud/packages/$IMAGE_NAME"
docker tag $IMAGE_NAME:latest $IMAGE_ID:latest
2023-10-28 07:32:29 +00:00
docker pull $IMAGE_ID:v1
docker pull $IMAGE_ID:v2
docker tag $IMAGE_ID:v2 $IMAGE_ID:v3
docker tag $IMAGE_ID:v1 $IMAGE_ID:v2
docker tag $IMAGE_ID:latest $IMAGE_ID:v1
docker push $IMAGE_ID:latest
2023-10-28 07:32:29 +00:00
docker push $IMAGE_ID:v1
docker push $IMAGE_ID:v2
docker push $IMAGE_ID:v3