Skip to content

add namespace property to all namespaced objects (#396) #140

add namespace property to all namespaced objects (#396)

add namespace property to all namespaced objects (#396) #140

Workflow file for this run

---
name: Release Charts
on:
push:
branches:
- master
paths:
- charts/**
env:
GITHUB_TOKEN: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
jobs:
release:
if: github.repository_owner == 'netdata'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ env.GITHUB_TOKEN }}
- name: Prepare Environment
run: pip3 install ruamel-yaml semver
- name: Configure Git
run: |
git config --global user.name Netdatabot
git config --global user.email [email protected]
- name: Get current version
id: get_current_var
run: echo "current_version=$(.github/scripts/update_versions.py get_chart_version)" >> $GITHUB_OUTPUT
- name: Update Files
run: .github/scripts/update_versions.py set_chart_version
- name: Get the new version
id: new_version_var
run: echo "new_version=$(.github/scripts/update_versions.py get_chart_version)" >> $GITHUB_OUTPUT
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Commit new version
id: commit_version
continue-on-error: true
run: |
git commit -am "[skip ci] New Chart version to ${{ steps.new_version_var.outputs.new_version }}"
git push
- name: Delete release tag in case of version update commit failure
id: delete-tag
if: steps.commit_version.outcome == 'failure'
run: |
git push origin --delete "netdata-${{ steps.new_version_var.outputs.new_version }}"
git ls-remote --tags
- name: Update Netdata Infra
if: steps.delete-tag.outcome == 'skipped'
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
repo: ${{ secrets.NETDATA_INFRA_REPO }}
workflow: Netdata Helm Chart Version Bump PR
ref: master
inputs: '{"version": "${{ steps.new_version_var.outputs.new_version }}", "previous_version": "${{ steps.get_current_var.outputs.current_version }}"}'
continue-on-error: true