Files
helm-docker/.gitea/workflows/release.yaml
CSRBot 274cf27972
All checks were successful
Build / build-arm64 (pull_request) Successful in 1m23s
Lint Markdown files / markdown-lint (pull_request) Successful in 28s
Build / build-amd64 (pull_request) Successful in 32s
Build / build-amd64 (push) Successful in 28s
Lint Markdown files / markdown-lint (push) Successful in 4s
Build / build-arm64 (push) Successful in 1m8s
chore(deps): update docker/setup-qemu-action action to v3.7.0
2025-11-05 17:10:12 +00:00

156 lines
5.2 KiB
YAML

name: Release
on:
push:
tags:
- "**"
workflow_dispatch:
inputs:
tag:
description: "Tag which should be released"
type: string
required: true
jobs:
push-arm64:
runs-on: ubuntu-latest-arm64
steps:
- id: version_extraction
name: Extract git tag
run: |
VERSION="${{ inputs.tag || github.ref_name }}"
VERSION="${VERSION#refs/*/}"
echo "Version (raw): ${VERSION}"
echo "Version (cleaned): ${VERSION/v/}"
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v5.0.0
with:
fetch-tags: true
ref: "${{ steps.version_extraction.outputs.version_raw }}"
- uses: docker/setup-qemu-action@v3.7.0
- uses: docker/setup-buildx-action@v3.11.1
- uses: docker/login-action@v3.6.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build and push image
run: |
docker buildx build \
--build-arg HELM_VERSION=${{ github.ref_name }} \
--file Dockerfile \
--platform linux/arm64 \
--provenance false \
--push \
--tag git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-arm64 \
.
push-amd64:
runs-on: ubuntu-latest-amd64
steps:
- id: version_extraction
name: Extract git tag
run: |
VERSION="${{ inputs.tag || github.ref_name }}"
VERSION="${VERSION#refs/*/}"
echo "Version (raw): ${VERSION}"
echo "Version (cleaned): ${VERSION/v/}"
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v5.0.0
with:
fetch-tags: true
ref: "${{ steps.version_extraction.outputs.version_raw }}"
- uses: docker/setup-qemu-action@v3.7.0
- uses: docker/setup-buildx-action@v3.11.1
- uses: docker/login-action@v3.6.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build and push image
run: |
docker buildx build \
--build-arg HELM_VERSION=${{ github.ref_name }} \
--file Dockerfile \
--platform linux/amd64 \
--provenance false \
--push \
--tag git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-amd64 \
.
push-manifest:
runs-on: ubuntu-latest
needs:
- push-arm64
- push-amd64
steps:
- id: version_extraction
name: Extract git tag
run: |
VERSION="${{ inputs.tag || github.ref_name }}"
VERSION="${VERSION#refs/*/}"
echo "Version (raw): ${VERSION}"
echo "Version (cleaned): ${VERSION/v/}"
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
- uses: docker/login-action@v3.6.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Create and push manifest
run: |
docker manifest create git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }} \
--amend git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-amd64 \
--amend git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-arm64
docker manifest push git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}
sync-to-hub-docker-io:
needs:
- push-manifest
runs-on: ubuntu-latest
steps:
- id: version_extraction
name: Extract git tag
run: |
VERSION="${{ inputs.tag || github.ref_name }}"
VERSION="${VERSION#refs/*/}"
echo "Version (raw): ${VERSION}"
echo "Version (cleaned): ${VERSION/v/}"
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
- name: Copy images to docker.io
run: |
apt-get update --yes
apt-get install --yes skopeo
skopeo copy \
--all \
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
--src-username volker.raschek \
docker://git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }} \
docker://docker.io/volkerraschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}