Skip to content

Update tempo-mixin to monitoring-mixins-v1.7.0 (#658) #315

Update tempo-mixin to monitoring-mixins-v1.7.0 (#658)

Update tempo-mixin to monitoring-mixins-v1.7.0 (#658) #315

Workflow file for this run

# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Charts / Release
on:
push:
branches:
- master
paths:
- "charts/**"
# pull_request:
# branches:
# - master
# paths:
# - "charts/**"
permissions:
contents: read
jobs:
release:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
packages: write # needed for ghcr access
id-token: write # needed for keyless signing
runs-on: ubuntu-latest
# container: ghcr.io/chgl/kube-powertools:v2.1.20
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Fetch history
run: git fetch --prune --unshallow
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.12.0
- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
config: .github/ct.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
done
# Update the generated timestamp in the index.yaml
# needed until https://github.com/helm/chart-releaser/issues/90
# or helm/chart-releaser-action supports this
post-release:
permissions:
contents: write # for Git to git push
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: "gh-pages"
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Commit and push timestamp updates
run: |
if [[ -f index.yaml ]]; then
export generated_date=$(date --utc +%FT%T.%9NZ)
sed -i -e "s/^generated:.*/generated: \"$generated_date\"/" index.yaml
git add index.yaml
git commit -sm "Update generated timestamp [ci-skip]" || exit 0
git push
fi
# update-website:
# permissions:
# contents: write # for Git to git push
# needs: post-release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
# with:
# ref: "gh-pages"
# fetch-depth: 0
# - name: Configure Git
# run: |
# git config user.name "$GITHUB_ACTOR"
# git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# - name: Use Node.js 14.x
# uses: actions/setup-node@v3.8.1
# with:
# node-version: 14.x
# - run: npx js-yaml index.yaml | npx hbs-cli .github/templates/index.hbs -i - -e md
# - name: Commit and push website
# run: |
# git add index.md
# git commit -sm "Update website [ci-skip]" || exit 0
# git push