You've already forked helm-docker
Compare commits
18 Commits
c66f038a8c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
274cf27972
|
|||
|
8e2c811bd6
|
|||
|
be0c064f75
|
|||
| 633e7ff468 | |||
|
f617356089
|
|||
| 9fd8857433 | |||
|
21f951436b
|
|||
| 7345cc00e1 | |||
|
f019cf5e4d
|
|||
|
c0d15516e2
|
|||
|
b15a4d9c58
|
|||
| c251c08c33 | |||
|
7f2d32a5ec
|
|||
|
a036844c8c
|
|||
| 12c04703e7 | |||
|
bc45c1b0e0
|
|||
| c25909951e | |||
|
ee37332a63
|
71
.gitea/workflows/auto-release.yaml
Normal file
71
.gitea/workflows/auto-release.yaml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Auto release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
paths:
|
||||||
|
- Makefile
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_EMAIL: noreply@cryptic.systems
|
||||||
|
GIT_USER: CSRBot
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tag_on_change:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5.0.0
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check if HELM_VERSION line changed
|
||||||
|
id: check_change
|
||||||
|
run: |
|
||||||
|
echo "changed=false" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
for file in Makefile; do
|
||||||
|
if git diff HEAD~1 HEAD -- "${file}" | grep --quiet '^[+-]HELM_VERSION'; then
|
||||||
|
echo "HELM_VERSION line changed."
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Stop if no change detected
|
||||||
|
if: steps.check_change.outputs.changed == 'false'
|
||||||
|
run: echo "No HELM_VERSION change. Exiting..."
|
||||||
|
|
||||||
|
- name: Create and push new tag
|
||||||
|
id: create_tag
|
||||||
|
if: steps.check_change.outputs.changed == 'true'
|
||||||
|
run: |
|
||||||
|
defined_tag="$(grep --only-matching --perl-regexp 'HELM_VERSION\?=v?[\d]*(\.[\d]*){0,2}' Makefile | cut --delimiter='=' --fields=2)"
|
||||||
|
|
||||||
|
echo "defined_tag=${defined_tag}" >> $GITHUB_OUTPUT
|
||||||
|
echo "New tag: ${defined_tag}"
|
||||||
|
|
||||||
|
git config --local user.name "${GIT_USER}"
|
||||||
|
git config --local user.email "${GIT_EMAIL}"
|
||||||
|
git tag -a "${defined_tag}" -m "${defined_tag}"
|
||||||
|
git push origin "${defined_tag}"
|
||||||
|
|
||||||
|
- name: Trigger "Push tagged images" workflow
|
||||||
|
uses: actions/github-script@v8.0.0
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const workflowFileName = 'release.yaml';
|
||||||
|
const defaultBranch = context.payload.repository.default_branch;
|
||||||
|
const definedTag = '${{ steps.create_tag.outputs.defined_tag }}';
|
||||||
|
|
||||||
|
await github.rest.actions.createWorkflowDispatch({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
workflow_id: workflowFileName,
|
||||||
|
ref: defaultBranch,
|
||||||
|
inputs: {
|
||||||
|
tag: definedTag
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -15,8 +15,8 @@ jobs:
|
|||||||
build-arm64:
|
build-arm64:
|
||||||
runs-on: ubuntu-latest-arm64
|
runs-on: ubuntu-latest-arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v5.0.0
|
||||||
- uses: docker/setup-qemu-action@v3.6.0
|
- uses: docker/setup-qemu-action@v3.7.0
|
||||||
- uses: docker/setup-buildx-action@v3.11.1
|
- uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
@@ -33,8 +33,8 @@ jobs:
|
|||||||
build-amd64:
|
build-amd64:
|
||||||
runs-on: ubuntu-latest-amd64
|
runs-on: ubuntu-latest-amd64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v5.0.0
|
||||||
- uses: docker/setup-qemu-action@v3.6.0
|
- uses: docker/setup-qemu-action@v3.7.0
|
||||||
- uses: docker/setup-buildx-action@v3.11.1
|
- uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
markdown-lint:
|
markdown-lint:
|
||||||
runs-on:
|
runs-on: ubuntu-latest
|
||||||
- ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v5.0.0
|
||||||
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
|
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
|
||||||
with:
|
with:
|
||||||
globs: '**/*.md'
|
globs: '**/*.md'
|
||||||
|
|||||||
@@ -4,16 +4,38 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "**"
|
- "**"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "Tag which should be released"
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push-arm64:
|
push-arm64:
|
||||||
runs-on: ubuntu-latest-arm64
|
runs-on: ubuntu-latest-arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- id: version_extraction
|
||||||
- uses: docker/setup-qemu-action@v3.6.0
|
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/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
- uses: docker/login-action@v3.4.0
|
- uses: docker/login-action@v3.6.0
|
||||||
with:
|
with:
|
||||||
registry: git.cryptic.systems
|
registry: git.cryptic.systems
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
@@ -21,25 +43,39 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
run: |
|
||||||
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--build-arg HELM_VERSION=${{ github.ref_name }} \
|
--build-arg HELM_VERSION=${{ github.ref_name }} \
|
||||||
--file Dockerfile \
|
--file Dockerfile \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
--provenance false \
|
--provenance false \
|
||||||
--push \
|
--push \
|
||||||
--tag git.cryptic.systems/volker.raschek/helm:${TAG}-arm64 \
|
--tag git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-arm64 \
|
||||||
.
|
.
|
||||||
|
|
||||||
push-amd64:
|
push-amd64:
|
||||||
runs-on: ubuntu-latest-amd64
|
runs-on: ubuntu-latest-amd64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- id: version_extraction
|
||||||
- uses: docker/setup-qemu-action@v3.6.0
|
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/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
- uses: docker/login-action@v3.4.0
|
- uses: docker/login-action@v3.6.0
|
||||||
with:
|
with:
|
||||||
registry: git.cryptic.systems
|
registry: git.cryptic.systems
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
@@ -47,15 +83,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
run: |
|
||||||
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--build-arg HELM_VERSION=${{ github.ref_name }} \
|
--build-arg HELM_VERSION=${{ github.ref_name }} \
|
||||||
--file Dockerfile \
|
--file Dockerfile \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--provenance false \
|
--provenance false \
|
||||||
--push \
|
--push \
|
||||||
--tag git.cryptic.systems/volker.raschek/helm:${TAG}-amd64 \
|
--tag git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}-amd64 \
|
||||||
.
|
.
|
||||||
|
|
||||||
push-manifest:
|
push-manifest:
|
||||||
@@ -64,7 +98,19 @@ jobs:
|
|||||||
- push-arm64
|
- push-arm64
|
||||||
- push-amd64
|
- push-amd64
|
||||||
steps:
|
steps:
|
||||||
- uses: docker/login-action@v3.4.0
|
- 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:
|
with:
|
||||||
registry: git.cryptic.systems
|
registry: git.cryptic.systems
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
@@ -72,30 +118,38 @@ jobs:
|
|||||||
|
|
||||||
- name: Create and push manifest
|
- name: Create and push manifest
|
||||||
run: |
|
run: |
|
||||||
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
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 create git.cryptic.systems/volker.raschek/helm:${TAG} \
|
docker manifest push git.cryptic.systems/volker.raschek/helm:${{ steps.version_extraction.outputs.version_cleaned }}
|
||||||
--amend git.cryptic.systems/volker.raschek/helm:${TAG}-amd64 \
|
|
||||||
--amend git.cryptic.systems/volker.raschek/helm:${TAG}-arm64
|
|
||||||
|
|
||||||
docker manifest push git.cryptic.systems/volker.raschek/helm:${TAG}
|
|
||||||
|
|
||||||
sync-to-hub-docker-io:
|
sync-to-hub-docker-io:
|
||||||
needs:
|
needs:
|
||||||
- push-manifest
|
- push-manifest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Copy images to docker.io
|
- id: version_extraction
|
||||||
run: |
|
name: Extract git tag
|
||||||
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
run: |
|
||||||
|
VERSION="${{ inputs.tag || github.ref_name }}"
|
||||||
|
VERSION="${VERSION#refs/*/}"
|
||||||
|
|
||||||
apt-get update --yes
|
echo "Version (raw): ${VERSION}"
|
||||||
apt-get install --yes skopeo
|
echo "Version (cleaned): ${VERSION/v/}"
|
||||||
skopeo copy \
|
|
||||||
--all \
|
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
|
||||||
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
|
|
||||||
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
- name: Copy images to docker.io
|
||||||
--src-username volker.raschek \
|
run: |
|
||||||
docker://git.cryptic.systems/volker.raschek/helm:${TAG} \
|
apt-get update --yes
|
||||||
docker://docker.io/volkerraschek/helm:${TAG}
|
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 }}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ jobs:
|
|||||||
runs-on:
|
runs-on:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v5.0.0
|
||||||
- uses: peter-evans/dockerhub-description@v4.0.2
|
- uses: peter-evans/dockerhub-description@v5.0.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/library/alpine:3.22.1
|
FROM docker.io/library/alpine:3.22.2
|
||||||
|
|
||||||
ARG HELM_VERSION
|
ARG HELM_VERSION
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
# HELM_VERSION
|
# HELM_VERSION
|
||||||
# Only required to install a specify version
|
# Only required to install a specify version
|
||||||
HELM_VERSION?=v3.18.4 # renovate: datasource=github-releases depName=helm/helm
|
HELM_VERSION?=v3.19.0 # renovate: datasource=github-releases depName=helm/helm
|
||||||
|
|
||||||
# CONTAINER_RUNTIME
|
# CONTAINER_RUNTIME
|
||||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||||
|
|||||||
62
README.md
62
README.md
@@ -3,59 +3,15 @@
|
|||||||
[](https://hub.docker.com/r/volkerraschek/helm)
|
[](https://hub.docker.com/r/volkerraschek/helm)
|
||||||
|
|
||||||
This project contains all sources to build the container image `git.cryptic.systems/volker.raschek/helm`. The primary
|
This project contains all sources to build the container image `git.cryptic.systems/volker.raschek/helm`. The primary
|
||||||
goal of this project is to package the binary `helm` as container image to provide the functionally for CI/CD workflows.
|
goal of this project is to package the binary `helm` as container image and provide the functionally for CI/CD workflows.
|
||||||
The source code of the binary can be found in the upstream project of [helm](github.com/helm/helm).
|
The source code of the binary can be found in the upstream project of [helm](github.com/helm/helm).
|
||||||
|
|
||||||
## drone
|
```bash
|
||||||
|
IMAGE_VERSION=3.19.0
|
||||||
Here is an example to lint, package and deploy a chart to chartmuseum via
|
docker run \
|
||||||
`git.cryptic.systems/volker.raschek/helm`.
|
--rm \
|
||||||
|
--volume "$(pwd):$(pwd)" \
|
||||||
```yaml
|
--workdir "$(pwd)" \
|
||||||
kind: pipeline
|
"git.cryptic.systems/volker.raschek/helm:${IMAGE_VERSION}" \
|
||||||
type: kubernetes
|
version
|
||||||
name: linter
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: helm lint
|
|
||||||
commands:
|
|
||||||
- helm lint
|
|
||||||
image: git.cryptic.systems/volker.raschek/helm:latest
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 50
|
|
||||||
memory: 50M
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: release
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: release-helm-chart
|
|
||||||
commands:
|
|
||||||
- helm plugin install https://github.com/chartmuseum/helm-push.git
|
|
||||||
- helm repo add myrepo https://charts.example.com/myrepo
|
|
||||||
- helm package --version ${DRONE_TAG} .
|
|
||||||
- helm cm-push ${DRONE_REPO_NAME}-${DRONE_TAG}.tgz myrepo
|
|
||||||
environment:
|
|
||||||
HELM_REPO_PASSWORD:
|
|
||||||
from_secret: helm_repo_password
|
|
||||||
HELM_REPO_USERNAME:
|
|
||||||
from_secret: helm_repo_username
|
|
||||||
image: git.cryptic.systems/volker.raschek/helm:latest
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 50
|
|
||||||
memory: 50M
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"customManagers": [
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"fileMatch": [
|
||||||
|
"^README\\.md$"
|
||||||
|
],
|
||||||
|
"matchStrings": [
|
||||||
|
"IMAGE_VERSION=(?<currentValue>.*)"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "github-releases",
|
||||||
|
"depNameTemplate": "helm/helm",
|
||||||
|
"versioningTemplate": "semver"
|
||||||
|
}
|
||||||
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"local>volker.raschek/renovate-config:default#master",
|
"local>volker.raschek/renovate-config:default#master",
|
||||||
"local>volker.raschek/renovate-config:container#master",
|
"local>volker.raschek/renovate-config:container#master",
|
||||||
@@ -8,9 +22,16 @@
|
|||||||
],
|
],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
"automerge": false,
|
"addLabels": [
|
||||||
"matchPackageNames": [ "helm" ],
|
"renovate/automerge"
|
||||||
"matchManagers": [ "regex" ]
|
],
|
||||||
|
"automerge": true,
|
||||||
|
"matchPackageNames": [
|
||||||
|
"helm/helm"
|
||||||
|
],
|
||||||
|
"matchManagers": [
|
||||||
|
"regex"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user