feat: port images
All checks were successful
act runner / build-act-runner (push) Successful in 2m24s
KeyDB / build-key-db-image (push) Successful in 47s

This commit is contained in:
Peter 2023-11-16 18:49:44 +01:00
parent 0eaf3fc60b
commit c3beb27941
No known key found for this signature in database
3 changed files with 57 additions and 12 deletions

View file

@ -0,0 +1,31 @@
---
name: act runner
on:
schedule:
- cron: '21 2 * * *'
push:
branches:
- main
jobs:
build-act-runner:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: code.icb4dc0.de
username: prskr
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "./act_runner"
push: true
tags: code.icb4dc0.de/infrastructure/images/act_runtime:latest

View file

@ -8,7 +8,7 @@ on:
- main - main
jobs: jobs:
build: build-key-db-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -16,19 +16,19 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Compose manifest - name: Compose manifest
using: docker uses: docker://quay.io/containers/buildah:v1.32.2
image: docker://quay.io/containers/buildah:v1.32.2
with: with:
entrypoint: /bin/bash
args: | args: |
buildah login "${IMAGE_REGISTRY}" --username "${GITEA_USER}" --password ${{ secrets.CONTAINER_REGISTRY_TOKEN }} -c -- 'buildah login "${IMAGE_REGISTRY}" --username "${GITEA_USER}" --password ${{ secrets.CONTAINER_REGISTRY_TOKEN }} && \
buildah pull "docker.io/eqalpha/keydb:x86_64_${IMAGE_TAG}" buildah pull "docker.io/eqalpha/keydb:x86_64_${IMAGE_TAG}" && \
buildah tag "docker.io/eqalpha/keydb:x86_64_${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:x86_64_${IMAGE_TAG}" buildah tag "docker.io/eqalpha/keydb:x86_64_${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:x86_64_${IMAGE_TAG}" && \
buildah pull "docker.io/eqalpha/keydb:arm64_${IMAGE_TAG}" buildah pull "docker.io/eqalpha/keydb:arm64_${IMAGE_TAG}" && \
buildah tag "docker.io/eqalpha/keydb:arm64_${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:arm64_${IMAGE_TAG}" buildah tag "docker.io/eqalpha/keydb:arm64_${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:arm64_${IMAGE_TAG}" && \
buildah manifest create "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" buildah manifest create "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" && \
buildah manifest add "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:x86_64_${IMAGE_TAG}" buildah manifest add "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:x86_64_${IMAGE_TAG}" && \
buildah manifest add "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:arm64_${IMAGE_TAG}" buildah manifest add "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "${IMAGE_REGISTRY}/${IMAGE_REPO}:arm64_${IMAGE_TAG}" && \
buildah manifest push --all "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "docker://${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" buildah manifest push --all "${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}" "docker://${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}"'
env: env:
GITEA_USER: prskr GITEA_USER: prskr
IMAGE_REGISTRY: code.icb4dc0.de IMAGE_REGISTRY: code.icb4dc0.de

14
act_runner/Dockerfile Normal file
View file

@ -0,0 +1,14 @@
ARG BASE_IMAGE=node:20-bookworm-slim
FROM ${BASE_IMAGE}
RUN --mount=type=cache,target=/var/lib/apt \
--mount=type=cache,target=/var/lib/cache \
apt-get update && \
apt-get install -y git-lfs ca-certificates curl gnupg && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > /etc/apt/sources.list.d/docker.list && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin