prometheus-postgres-exporter/.gitea/workflows/release.yaml

45 lines
1.6 KiB
YAML
Raw Normal View History

2025-01-11 19:23:30 +00:00
name: Release
on:
push:
tags:
2025-01-12 14:30:14 +00:00
- "**"
2025-01-11 19:23:30 +00:00
jobs:
2025-01-12 14:32:22 +00:00
publish-chart:
2025-01-12 14:25:54 +00:00
container:
image: docker.io/volkerraschek/helm:3.16.1
2025-01-11 19:23:30 +00:00
runs-on: ubuntu-latest
steps:
2025-01-12 14:30:54 +00:00
- name: Install tooling
run: |
apk update
2025-01-12 14:32:22 +00:00
apk add git npm
2025-01-11 19:23:30 +00:00
- uses: actions/checkout@v4
2025-01-12 15:29:44 +00:00
- name: Package chart
2025-01-12 14:25:54 +00:00
env:
2025-01-12 15:29:44 +00:00
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 }}
2025-01-11 19:23:30 +00:00
run: |
2025-01-12 14:45:20 +00:00
PACKAGE_VERSION=${GITHUB_REF#refs/tags/}
2025-01-12 15:29:44 +00:00
REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2)
REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)
2025-01-12 14:25:54 +00:00
2025-01-11 19:23:30 +00:00
helm dependency build
2025-01-12 14:25:54 +00:00
helm package --version "${PACKAGE_VERSION}" ./
2025-01-12 15:29:44 +00:00
# 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
2025-01-12 14:25:54 +00:00
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME}
2025-01-12 15:29:44 +00:00
helm repo remove ${HELM_REPO_NAME}