chore(chart-deps): update kube-prometheus-stack to version 83.4.2 #2331
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: chart-deps compare output to main | |
| on: | |
| workflow_dispatch: ~ | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| - "charts/**" | |
| - "values/**" | |
| - "tests/fixtures/**" | |
| - "helmfile.d/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-commit: | |
| runs-on: ubuntu-latest | |
| # Skip this pre-check check when triggered manually | |
| if: github.event_name != 'workflow_dispatch' | |
| outputs: | |
| skip: ${{ steps.check.outputs.skip }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 2 | |
| - name: Check commit message and draft status | |
| id: check | |
| run: | | |
| COMMIT_MSG=$(git log -1 --pretty=%B) | |
| IS_DRAFT="${{ github.event.pull_request.draft }}" | |
| EVENT_ACTION="${{ github.event.action }}" | |
| echo "Commit message: $COMMIT_MSG" | |
| echo "Is draft: $IS_DRAFT" | |
| echo "Event action: $EVENT_ACTION" | |
| if [[ $IS_DRAFT == "true" ]]; then | |
| echo "Skipping - PR is in draft" | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| elif [[ $COMMIT_MSG == "Merge branch"* && $EVENT_ACTION != "ready_for_review" ]]; then | |
| # Skip if merge commit, unless it is triggered by the ready_for_review event | |
| echo "Skipping - merge commit" | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "Running workflow" | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Show output | |
| run: | | |
| echo "Skip value: ${{ steps.check.outputs.skip }}" | |
| run-compare: | |
| runs-on: ubuntu-latest | |
| needs: check-commit | |
| if: ${{ github.event_name == 'workflow_dispatch' || (success() && needs.check-commit.outputs.skip != 'true') }} | |
| steps: | |
| - name: Install GitHub CLI | |
| run: | | |
| sudo apt update | |
| sudo apt install gh -y | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| path: pr | |
| - name: Checkout base branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref || 'main' }} | |
| path: base | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: 'pr/.nvmrc' | |
| - name: Install npm dependencies | |
| run: cd "$GITHUB_WORKSPACE/pr" && npm install --no-save && cd "$GITHUB_WORKSPACE/base" && npm install --no-save | |
| - name: Install Helm and Helmfile | |
| uses: helmfile/helmfile-action@v2.4.2 | |
| with: | |
| helmfile-args: version # In this step, we only want these tools to be installed | |
| helm-plugins: > | |
| https://github.com/databus23/helm-diff, | |
| https://github.com/jkroepke/helm-secrets | |
| - name: Install dyff | |
| run: | | |
| DYFF_VERSION="1.10.3" | |
| wget https://github.com/homeport/dyff/releases/download/v${DYFF_VERSION}/dyff_${DYFF_VERSION}_linux_amd64.tar.gz | |
| tar -xzf dyff_${DYFF_VERSION}_linux_amd64.tar.gz | |
| sudo mv dyff /usr/local/bin/ | |
| dyff version | |
| - name: Run compare script and add comment | |
| id: run_script | |
| env: | |
| GH_TOKEN: ${{ secrets.BOT_TOKEN }} | |
| run: | | |
| mkdir -p tmp | |
| "$GITHUB_WORKSPACE/pr/bin/compare.sh" "$GITHUB_WORKSPACE/base" "$GITHUB_WORKSPACE/pr" --diff-output tmp/diff-output.txt | |
| comment_file="$PWD/tmp/pr-comment.txt" | |
| echo "Comparison of Helm chart templating output:" > "$comment_file" | |
| echo '```diff' >> "$comment_file" | |
| cat tmp/diff-output.txt >> "$comment_file" | |
| echo '```' >> "$comment_file" | |
| cd "$GITHUB_WORKSPACE/pr" && gh pr comment ${{ github.event.pull_request.number }} --body-file "$comment_file" --create-if-none --edit-last |