Skip to content

[chore] Add marcschaeferger to triager section (#2391) #1227

[chore] Add marcschaeferger to triager section (#2391)

[chore] Add marcschaeferger to triager section (#2391) #1227

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
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
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v4.0.5
- name: Add dependent repositories
run: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana-community.github.io/helm-charts
helm repo add jaeger https://jaegertracing.github.io/helm-charts
helm repo add opensearch https://opensearch-project.github.io/helm-charts
- name: GPG configuration
run: |-
echo "$GPG_KEY" > "$GPG_KEY_PATH"
mkdir -p "$HOME/.gnupg"
chmod 0700 "$HOME/.gnupg"
echo "use-agent" > "$HOME/.gnupg/gpg.conf"
echo "pinentry-mode loopback" >> "$HOME/.gnupg/gpg.conf"
echo "allow-loopback-pinentry" > "$HOME/.gnupg/gpg-agent.conf"
echo "max-cache-ttl 86400" >> "$HOME/.gnupg/gpg-agent.conf"
echo "default-cache-ttl 86400" >> "$HOME/.gnupg/gpg-agent.conf"
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent
gpg --batch --yes --passphrase-fd 0 --import "$GPG_KEY_PATH" <<< "$GPG_PASSPHRASE"
gpg --batch --yes --export "$GPG_KEY_ID" > ~/.gnupg/pubring.gpg
gpg --batch --yes --passphrase-fd 0 --export-secret-keys "$GPG_KEY_ID" > ~/.gnupg/secring.gpg <<< "$GPG_PASSPHRASE"
cat > "$GPG_PASSPHRASE_FILE" <<< "$GPG_PASSPHRASE"
env:
GPG_KEY_ID: "${{ vars.GPG_KEY_ID }}"
GPG_KEY: "${{ secrets.GPG_PRIVATE_KEY }}"
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
GPG_PASSPHRASE_FILE: "${{ runner.temp }}/gpg-passphrase"
GPG_KEY_PATH: "${{ runner.temp }}/private.key"
- name: Run chart-releaser
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
with:
charts_dir: charts
config: .github/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
CR_SIGN: true
CR_KEY: "${{ vars.GPG_KEY_NAME }}"
CR_KEYRING: "~/.gnupg/secring.gpg"
CR_PASSPHRASE_FILE: "${{ runner.temp }}/gpg-passphrase"
- name: Login to GitHub Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Helm OCI Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io \
--username ${{ github.actor }} \
--password-stdin
- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
echo "Pushing ${pkg} to oci://ghcr.io/${GITHUB_REPOSITORY}"
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY}"
done
- name: Fetch newly created tags
run: |
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
git fetch --tags origin
- name: Enhance release notes with OpenTelemetry links
run: .github/scripts/enhance-release-notes.sh
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_REPOSITORY: "${{ github.repository }}"