fix(tempo-mixin): ConfigMap naming (#744) #337
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) Nicolas Lamirault <[email protected]> | |
# | |
# 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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Set up Helm | |
uses: azure/[email protected] | |
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/[email protected] | |
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: "gh-pages" | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- 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 "[email protected]" | |
# - name: Use Node.js 14.x | |
# uses: actions/[email protected] | |
# 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 |