ContainersWorkspace/.forgejo/workflows/build-images.yml
Szwendacz 541c5b8f20
Some checks failed
Build images / build-images-amd64 (push) Failing after 9m34s
Build images / build-images-arm64 (push) Failing after 12m18s
Build images / update-images-manifests (push) Has been skipped
add pycert to system-toolbox
2024-04-05 13:58:24 +02:00

71 lines
2.4 KiB
YAML

name: Build images
run-name: Build images
on:
push:
branches: [ "main" ]
schedule:
- cron: '30 5 */10 * *'
env:
IMAGES: system-toolbox cloud-toolbox tor zabbix-agent snowflake jupyter
jobs:
build-images-arm64:
runs-on: [ arm64 ]
steps:
- name: show info
run: |
ulimit -a
- name: install actions deps
run: |
dnf install -y nodejs git
- name: Check out repository code
uses: actions/checkout@v3
- name: login to registry
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Build selected images
run: |
for image in ${IMAGES};
do
echo "building image $image";
podman build ./$image --tag forgejo.maciej.cloud/pkg/$image:arm64;
echo "pushing image $image";
podman push forgejo.maciej.cloud/pkg/$image:arm64;
done
build-images-amd64:
runs-on: [ amd64 ]
steps:
- name: show info
run: |
ulimit -a
- name: install actions deps
run: |
dnf install -y nodejs git
- name: Check out repository code
uses: actions/checkout@v3
- name: login to registry
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Build selected images
run: |
for image in ${IMAGES};
do
echo "building image $image";
podman build ./$image --tag forgejo.maciej.cloud/pkg/$image:amd64;
echo "pushing image $image";
podman push forgejo.maciej.cloud/pkg/$image:amd64;
done
update-images-manifests:
runs-on: [ amd64 ]
needs:
- build-images-amd64
- build-images-arm64
steps:
- name: login to registry
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Create manifests and push
run: |
for image in ${IMAGES};
do
echo "Updating manifest for $image";
podman manifest create forgejo.maciej.cloud/pkg/$image:latest forgejo.maciej.cloud/pkg/$image:amd64 forgejo.maciej.cloud/pkg/$image:arm64;
podman manifest push forgejo.maciej.cloud/pkg/$image:latest forgejo.maciej.cloud/pkg/$image:latest;
done