v3.0.0: Docker-Migration mit CI-Pipeline und neuen Features
- Gitea CI-Workflows fuer Multi-Arch Docker Builds (amd64 + arm64) - Beschreibungsfeld und mehrtaegige Zeitplanung fuer Jobs - Benachrichtigungen auf Deutsch - docker-compose nutzt Registry-Image Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
9fa589789e
commit
b446ce9b3e
@@ -0,0 +1,76 @@
|
||||
name: Build Dev Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main, dev]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'README.md'
|
||||
- 'LICENSE'
|
||||
|
||||
env:
|
||||
REGISTRY: git.techniverse.net
|
||||
IMAGE: git.techniverse.net/scriptos/stream-recorder
|
||||
|
||||
jobs:
|
||||
build-amd64:
|
||||
runs-on: linux-amd64
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push amd64 image
|
||||
run: |
|
||||
docker build --pull --platform linux/amd64 \
|
||||
-t "${IMAGE}:dev-amd64" \
|
||||
-t "${IMAGE}:dev-${GITHUB_SHA}-amd64" \
|
||||
.
|
||||
docker push "${IMAGE}:dev-amd64"
|
||||
docker push "${IMAGE}:dev-${GITHUB_SHA}-amd64"
|
||||
|
||||
build-arm64:
|
||||
runs-on: linux-arm64
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push arm64 image
|
||||
run: |
|
||||
docker build --pull --platform linux/arm64 \
|
||||
-t "${IMAGE}:dev-arm64" \
|
||||
-t "${IMAGE}:dev-${GITHUB_SHA}-arm64" \
|
||||
.
|
||||
docker push "${IMAGE}:dev-arm64"
|
||||
docker push "${IMAGE}:dev-${GITHUB_SHA}-arm64"
|
||||
|
||||
publish-dev-manifest:
|
||||
runs-on: linux-amd64
|
||||
needs: [build-amd64, build-arm64]
|
||||
steps:
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Publish dev manifests
|
||||
run: |
|
||||
docker manifest create "${IMAGE}:dev-latest" \
|
||||
--amend "${IMAGE}:dev-amd64" \
|
||||
--amend "${IMAGE}:dev-arm64"
|
||||
docker manifest push "${IMAGE}:dev-latest"
|
||||
|
||||
docker manifest create "${IMAGE}:dev-${GITHUB_SHA}" \
|
||||
--amend "${IMAGE}:dev-${GITHUB_SHA}-amd64" \
|
||||
--amend "${IMAGE}:dev-${GITHUB_SHA}-arm64"
|
||||
docker manifest push "${IMAGE}:dev-${GITHUB_SHA}"
|
||||
@@ -0,0 +1,87 @@
|
||||
name: Build Release Docker Image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGISTRY: git.techniverse.net
|
||||
IMAGE: git.techniverse.net/scriptos/stream-recorder
|
||||
|
||||
jobs:
|
||||
build-amd64:
|
||||
runs-on: linux-amd64
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push amd64 release image
|
||||
run: |
|
||||
RELEASE_TAG="${GITHUB_REF_NAME}"
|
||||
VERSION="${RELEASE_TAG#v}"
|
||||
|
||||
docker build --pull --platform linux/amd64 \
|
||||
-t "${IMAGE}:${RELEASE_TAG}-amd64" \
|
||||
-t "${IMAGE}:${VERSION}-amd64" \
|
||||
.
|
||||
docker push "${IMAGE}:${RELEASE_TAG}-amd64"
|
||||
docker push "${IMAGE}:${VERSION}-amd64"
|
||||
|
||||
build-arm64:
|
||||
runs-on: linux-arm64
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push arm64 release image
|
||||
run: |
|
||||
RELEASE_TAG="${GITHUB_REF_NAME}"
|
||||
VERSION="${RELEASE_TAG#v}"
|
||||
|
||||
docker build --pull --platform linux/arm64 \
|
||||
-t "${IMAGE}:${RELEASE_TAG}-arm64" \
|
||||
-t "${IMAGE}:${VERSION}-arm64" \
|
||||
.
|
||||
docker push "${IMAGE}:${RELEASE_TAG}-arm64"
|
||||
docker push "${IMAGE}:${VERSION}-arm64"
|
||||
|
||||
publish-release-manifest:
|
||||
runs-on: linux-amd64
|
||||
needs: [build-amd64, build-arm64]
|
||||
steps:
|
||||
- name: Login to Gitea Container Registry
|
||||
run: echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${GITHUB_ACTOR}" --password-stdin
|
||||
env:
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Publish release manifests
|
||||
run: |
|
||||
RELEASE_TAG="${GITHUB_REF_NAME}"
|
||||
VERSION="${RELEASE_TAG#v}"
|
||||
|
||||
docker manifest create "${IMAGE}:${RELEASE_TAG}" \
|
||||
--amend "${IMAGE}:${RELEASE_TAG}-amd64" \
|
||||
--amend "${IMAGE}:${RELEASE_TAG}-arm64"
|
||||
docker manifest push "${IMAGE}:${RELEASE_TAG}"
|
||||
|
||||
if [ "${VERSION}" != "${RELEASE_TAG}" ]; then
|
||||
docker manifest create "${IMAGE}:${VERSION}" \
|
||||
--amend "${IMAGE}:${VERSION}-amd64" \
|
||||
--amend "${IMAGE}:${VERSION}-arm64"
|
||||
docker manifest push "${IMAGE}:${VERSION}"
|
||||
fi
|
||||
|
||||
docker manifest create "${IMAGE}:latest" \
|
||||
--amend "${IMAGE}:${RELEASE_TAG}-amd64" \
|
||||
--amend "${IMAGE}:${RELEASE_TAG}-arm64"
|
||||
docker manifest push "${IMAGE}:latest"
|
||||
Reference in New Issue
Block a user