Skip to content

feat: added serviceMonitor prometheusCRD dependencies #30

feat: added serviceMonitor prometheusCRD dependencies

feat: added serviceMonitor prometheusCRD dependencies #30

name: Release Charts
on:
push:
paths:
- 'charts/**'
branches:
- master
permissions:
contents: write
packages: write
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
VERSION_DEV: ${{ steps.read_version.outputs.VERSION_DEV }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read VERSION file
id: read_version
run: |
if grep -q "rc" VERSION ; then
echo "VERSION_DEV=true" >> $GITHUB_OUTPUT
else
echo "VERSION_DEV=false" >> $GITHUB_OUTPUT
fi
release:
needs: [check-version]
runs-on: ubuntu-latest
if: needs.check-version.outputs.VERSION_DEV == 'false'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: 3.10.1
- name: Run chart-releaser
uses: helm/[email protected]
with:
mark_as_latest: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
CR_SKIP_EXISTING: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Charts to GHCR
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts
done