chore(deps): update all non-major dependencies (#546) #264
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
name: Release Charts | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "charts/**" | |
permissions: read-all | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
container: ghcr.io/chgl/kube-powertools:v2.3.22@sha256:3693e6ffe8f3d4f4dfbf9fcc7a18b8f26e561870668031667d9132df3a9ee8ab | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
steps: | |
- name: Add workspace as safe directory | |
run: | | |
git config --global --add safe.directory /__w/charts/charts | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Update dependencies | |
run: find charts/ ! -path charts/ -maxdepth 1 -type d -exec helm dependency update {} \; | |
- name: Generate changelogs | |
run: generate-chart-changelog.sh | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | |
with: | |
config: .github/ct/ct.yaml | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 | |
- name: Login to GitHub Container Registry | |
run: | | |
echo "${GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin | |
echo "${GHCR_REGISTRY_PASSWORD}" | crane auth login ghcr.io --username ${{ github.actor }} --password-stdin | |
env: | |
GHCR_REGISTRY_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Push Charts to ghcr.io | |
run: | | |
for pkg in .cr-release-packages/*; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
helm push "${pkg}" oci://ghcr.io/${{ github.repository }} 2> .digest | |
OCI_ARTIFACT_PATH="$(awk -F "[, ]+" '/Pushed/{print $NF}' < .digest)" | |
OCI_ARTIFACT_DIGEST="$(awk -F "[, ]+" '/Digest/{print $NF}' < .digest)" | |
cosign sign --yes "${OCI_ARTIFACT_PATH}@${OCI_ARTIFACT_DIGEST}" | |
done |