Skip to content

chore(matrix): derive CI scenario validation from filesystem #47385

chore(matrix): derive CI scenario validation from filesystem

chore(matrix): derive CI scenario validation from filesystem #47385

Workflow file for this run

name: "Chart - Chores"
on:
pull_request:
branches:
- main
paths:
- ".github/workflows/chart-chores.yaml"
- "charts/**"
permissions:
contents: write
pull-requests: write
jobs:
chores:
if: ${{ !startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'release-please--') }}
name: Chart chores
runs-on: ubuntu-latest
steps:
- name: Import Vault secrets for Harbor
uses: hashicorp/vault-action@892a26828f195e65540a40b4768ae4571f51ebfc # v4.0.0
id: vault-harbor
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/products/distribution/ci GH_APP_ID_DISTRO_CI;
secret/data/products/distribution/ci GH_APP_PRIVATE_KEY_DISTRO_CI;
exportEnv: true
#
# Checkout.
#
- name: Generate GitHub token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
id: generate-github-token
with:
app_id: ${{ env.GH_APP_ID_DISTRO_CI }}
private_key: ${{ env.GH_APP_PRIVATE_KEY_DISTRO_CI }}
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: "${{ steps.generate-github-token.outputs.token }}"
- name: Configure curl and wget
uses: ./.github/actions/setup-curl
#
# Dependencies.
#
- name: Install tools
uses: ./.github/actions/install-tool-versions
with:
tools: |
golang
helm
helm-ct
yq
- name: Install readme-generator-for-helm
run: |
# renovate: datasource=npm depName=@bitnami/readme-generator-for-helm
npm install -g @bitnami/readme-generator-for-helm@2.7.2
- name: Add Helm repos
run: |
make helm.repos-add
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/.asdf/installs/golang/*/packages/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
#
# Update
#
- name: Set vars
run: |
echo "CHANGED_CHARTS=$(ct list-changed | tr '\n' ' ')" | tee -a $GITHUB_ENV
- name: Update golden files
run: |
chartPath="${CHANGED_CHARTS}" \
make go.update-golden-only
- name: Update README
run: |
chartPath="${CHANGED_CHARTS}" \
make helm.readme-update
- name: Update Schema
run: |
chartPath="${CHANGED_CHARTS}" \
make helm.schema-update
- name: Git pull
run: git pull --rebase --autostash .
- uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 # v10.0.0
with:
author_name: "distro-ci[bot]"
author_email: "122795778+distro-ci[bot]@users.noreply.github.com"
message: "chore: chart chores"