nvim/.forgejo/workflows/build-images.yml
Maciej Lebiest fce84d8735
All checks were successful
Build neovim image / build-neovim-amd64 (push) Successful in 15m51s
Build neovim image / build-neovim-arm64 (push) Successful in 19m15s
Build neovim image / update-images-manifest (push) Successful in 15s
increase nofile ulimit in build job
2024-04-06 22:44:19 +02:00

72 lines
2.7 KiB
YAML

name: Build neovim image
run-name: Build Neovim image yay
on:
push:
branches: [ "main" ]
schedule:
- cron: '30 3 */10 * *'
jobs:
build-neovim-arm64:
runs-on: arm64
steps:
- name: install actions deps
run: |
dnf install -y nodejs git
- name: Check out repository code
uses: actions/checkout@v3
- run: |
podman build --ulimit nofile=10240:10240 . --tag forgejo.maciej.cloud/pkg/neovim:arm64
- name: login to registry
run: |
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Push image
run: |
IMAGE_NAME="neovim"
IMAGE_ID="forgejo.maciej.cloud/pkg/$IMAGE_NAME"
podman pull $IMAGE_ID:arm64-v1
podman pull $IMAGE_ID:arm64-v2
podman tag $IMAGE_ID:arm64-v2 $IMAGE_ID:arm64-v3
podman tag $IMAGE_ID:arm64-v1 $IMAGE_ID:arm64-v2
podman tag $IMAGE_ID:arm64 $IMAGE_ID:arm64-v1
podman push $IMAGE_ID:arm64-v1
podman push $IMAGE_ID:arm64-v2
podman push $IMAGE_ID:arm64-v3
build-neovim-amd64:
runs-on: amd64
steps:
- name: install actions deps
run: |
dnf install -y nodejs git
- name: Check out repository code
uses: actions/checkout@v3
- run: |
podman build --ulimit nofile=10240:10240 . --tag forgejo.maciej.cloud/pkg/neovim:amd64
- name: login to registry
run: |
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Push image
run: |
IMAGE_NAME="neovim"
IMAGE_ID="forgejo.maciej.cloud/pkg/$IMAGE_NAME"
podman pull $IMAGE_ID:amd64-v1
podman pull $IMAGE_ID:amd64-v2
podman tag $IMAGE_ID:amd64-v2 $IMAGE_ID:amd64-v3
podman tag $IMAGE_ID:amd64-v1 $IMAGE_ID:amd64-v2
podman tag $IMAGE_ID:amd64 $IMAGE_ID:amd64-v1
podman push $IMAGE_ID:amd64-v1
podman push $IMAGE_ID:amd64-v2
podman push $IMAGE_ID:amd64-v3
update-images-manifest:
runs-on: [ amd64 ]
needs:
- build-neovim-arm64
- build-neovim-amd64
steps:
- name: login to registry
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Create manifest and push
run: |
echo "Updating manifest for neovim";
podman manifest create forgejo.maciej.cloud/pkg/neovim:latest forgejo.maciej.cloud/pkg/neovim:amd64-v1 forgejo.maciej.cloud/pkg/neovim:arm64-v1;
podman manifest push forgejo.maciej.cloud/pkg/neovim:latest forgejo.maciej.cloud/pkg/neovim:latest;