ContainersWorkspace/.forgejo/workflows/build-images.yml
Maciej Lebiest 4ce7be943b
Some checks failed
Build images / build-images-amd64 (push) Failing after 3m37s
Build images / build-images-arm64 (push) Failing after 3m36s
Build images / update-images-manifests (push) Has been skipped
add gui-container build, minor env updates
2024-04-29 19:24:58 +02:00

65 lines
2.3 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 gui-container
jobs:
build-images-arm64:
runs-on: [ arm64 ]
steps:
- 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 --ulimit nofile=10240:10240 ./$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: 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 --ulimit nofile=10240:10240 ./$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