[prometheus-mongodb-exporter] Update dependency percona/mongodb_exporter to v2 - autoclosed #312
Workflow file for this run
This file contains hidden or 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: Pull Request | |
| permissions: {} | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: ["opened", "reopened", "synchronize", "edited"] | |
| jobs: | |
| check-title: | |
| name: Check Title | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Helm | |
| uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 | |
| with: | |
| # renovate: github=helm/helm | |
| version: v4.2.3 | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0 | |
| with: | |
| # renovate: github=helm/chart-testing | |
| version: v3.14.0 | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed="$(ct list-changed --config .github/linters/ct.yaml)" | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| echo "changed_list=\"${changed//$'\n'/ }\"" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Validate PR Title format | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| CHANGED_LIST="${CHANGED_LIST//\"/}" | |
| # Derive chart name from the changed path and validate it. | |
| if [[ "$CHANGED_LIST" == */* ]]; then | |
| CHART_NAME="${CHANGED_LIST##*/}" | |
| else | |
| echo "Error: Unexpected chart identifier '$CHANGED_LIST'. Expected a path containing '/'." >&2 | |
| exit 1 | |
| fi | |
| if [[ -z "$CHART_NAME" ]]; then | |
| echo "Error: Derived chart name is empty. Original value: '$CHANGED_LIST'." >&2 | |
| exit 1 | |
| fi | |
| # Optional sanity check: ensure chart name contains only expected characters. | |
| if ! [[ "$CHART_NAME" =~ ^[a-zA-Z0-9._-]+$ ]]; then | |
| echo "Error: Derived chart name '$CHART_NAME' contains unexpected characters." >&2 | |
| exit 1 | |
| fi | |
| if [[ "$PR_TITLE" != "[${CHART_NAME}] "* ]]; then | |
| echo "PR title must start with '[${CHART_NAME}] '." >&2 | |
| exit 1 | |
| fi | |
| env: | |
| CHANGED_LIST: ${{ steps.list-changed.outputs.changed_list }} | |
| PR_TITLE: ${{ github.event.pull_request.title }} |