simplify build and tagging
This commit is contained in:
parent
c832848368
commit
de7207c481
1 changed files with 8 additions and 24 deletions
|
@ -6,6 +6,8 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 3 */10 * *'
|
- cron: '30 3 */10 * *'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: forgejo.maciej.cloud/pkg/neovim
|
||||||
jobs:
|
jobs:
|
||||||
build-neovim-arm64:
|
build-neovim-arm64:
|
||||||
runs-on: arm64
|
runs-on: arm64
|
||||||
|
@ -16,22 +18,13 @@ jobs:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- run: |
|
- run: |
|
||||||
podman build --ulimit nofile=10240:10240 . --tag forgejo.maciej.cloud/pkg/neovim:arm64
|
podman build --ulimit nofile=10240:10240 . --tag $IMAGE:arm64
|
||||||
- name: login to registry
|
- name: login to registry
|
||||||
run: |
|
run: |
|
||||||
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
|
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME="neovim"
|
podman push $IMAGE:arm64
|
||||||
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:
|
build-neovim-amd64:
|
||||||
runs-on: amd64
|
runs-on: amd64
|
||||||
steps:
|
steps:
|
||||||
|
@ -41,22 +34,13 @@ jobs:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- run: |
|
- run: |
|
||||||
podman build --ulimit nofile=10240:10240 . --tag forgejo.maciej.cloud/pkg/neovim:amd64
|
podman build --ulimit nofile=10240:10240 . --tag $IMAGE:amd64
|
||||||
- name: login to registry
|
- name: login to registry
|
||||||
run: |
|
run: |
|
||||||
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
|
podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME="neovim"
|
podman push $IMAGE:amd64
|
||||||
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:
|
update-images-manifest:
|
||||||
runs-on: [ amd64 ]
|
runs-on: [ amd64 ]
|
||||||
needs:
|
needs:
|
||||||
|
@ -68,5 +52,5 @@ jobs:
|
||||||
- name: Create manifest and push
|
- name: Create manifest and push
|
||||||
run: |
|
run: |
|
||||||
echo "Updating manifest for neovim";
|
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 create $IMAGE:latest $IMAGE:amd64 $IMAGE:arm64;
|
||||||
podman manifest push forgejo.maciej.cloud/pkg/neovim:latest forgejo.maciej.cloud/pkg/neovim:latest;
|
podman manifest push $IMAGE:latest $IMAGE:latest;
|
||||||
|
|
Loading…
Reference in a new issue