prometheus-postgres-exporter/.gitea/workflows/release.yaml
Markus Pesch 657730eaf0
Some checks failed
Helm / helm-lint (pull_request) Successful in 29s
Helm / helm-unittest (pull_request) Successful in 22s
Release / publish-chart (push) Failing after 27s
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
adasd
2025-01-12 16:29:44 +01:00

45 lines
1.6 KiB
YAML

name: Release
on:
push:
tags:
- "**"
jobs:
publish-chart:
container:
image: docker.io/volkerraschek/helm:3.16.1
runs-on: ubuntu-latest
steps:
- name: Install tooling
run: |
apk update
apk add git npm
- uses: actions/checkout@v4
- name: Package chart
env:
HELM_REPO_NAME: upload
CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }}
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
GITEA_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
GITEA_SERVER_URL: ${{ github.server_url }}
run: |
PACKAGE_VERSION=${GITHUB_REF#refs/tags/}
REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2)
REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)
helm dependency build
helm package --version "${PACKAGE_VERSION}" ./
# chart-museum
helm repo add --username ${CHARTMUSEUM_USERNAME} --password ${CHARTMUSEUM_PASSWORD} ${HELM_REPO_NAME} https://${CHARTMUSEUM_HOSTNAME}/${HELM_REPO_NAME}
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME}
helm repo remove ${HELM_REPO_NAME}
# gitea
helm repo add --username ${REPOSITORY_OWNER} --password ${GITEA_PACKAGE_REGISTRY_TOKEN} ${HELM_REPO_NAME} https://${GITEA_SERVER_URL}/api/packages/${REPOSITORY_OWNER}/helm
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME}
helm repo remove ${HELM_REPO_NAME}