chore(deps): update helm release postgresql to v16 #1562
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: Chart Lint | |
on: [push, pull_request] | |
jobs: | |
chart-lint: | |
runs-on: ubuntu-latest | |
env: | |
# Force running all charts on master branch | |
# --all Disables changed charts detection and version increment checking | |
CT_ALL: ${{ github.ref == 'refs/heads/master' }} | |
# Multiple KinD version | |
strategy: | |
fail-fast: false | |
matrix: | |
helm_version: [v3.4.0] | |
k8s_version: [v1.20.15, v1.22.5, v1.23.17, v1.24.15, v1.26.6, v1.27.3, v1.28.0] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.7 | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Set up Helm | |
uses: azure/setup-helm@v3.5 | |
with: | |
version: ${{ matrix.helm_version }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed) | |
echo "list_changed=$changed" >> $GITHUB_ENV | |
if [[ -n "$changed" ]]; then | |
echo "::set-output name=changed::true" | |
echo "::set-output name=list::$changed" | |
fi | |
- name: Comment | |
uses: peter-evans/create-or-update-comment@v4 | |
id: comment | |
if: ${{ github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
Testing on Kubernetes **${{ matrix.k8s_version }}**, Helm **${{ matrix.helm_version }}** ... [(Run ${{ github.run_id }})](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
${{ env.list_changed }} | |
- name: Run chart-testing (lint) | |
id: lint | |
run: | | |
echo 'LINT_STATUS<<EOF' >> $GITHUB_ENV | |
ct lint --config .github/ct-lint.yaml || { | |
echo "$(cat)" | |
echo "$(cat)" >> $GITHUB_ENV; | |
echo "$(cat)" >> $GITHUB_STEP_SUMMARY; | |
STATUS=$(cat); | |
exit_code=$?; } | |
echo >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
exit $exit_code | |
- name: Comment (after ct lint successfully) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ success() && github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
body: | | |
<details> | |
<summary>Linting chart successfully :rocket:.</summary> | |
``` | |
${{ env.LINT_STATUS }} | |
``` | |
</details> | |
- name: Comment (after ct lint failure) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ failure() && github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
reactions: -1 | |
body: | | |
<details> | |
<summary>Linting chart failure! :no_good:</summary> | |
``` | |
${{ env.LINT_STATUS }} | |
``` | |
</details> | |
- name: Comment (before create KinD cluster) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
body: | | |
Creating KinD cluster ${{ matrix.kubectl_version }} ...<br /> | |
- name: Create KinD cluster | |
uses: helm/kind-action@v1.10.0 | |
with: | |
kubectl_version: ${{ matrix.k8s_version }} | |
node_image: kindest/node:${{ matrix.k8s_version }} | |
# if: steps.list-changed.outputs.changed == 'true' | |
- name: Comment (after create KinD successfully) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ success() && github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
reactions: rocket | |
body: | | |
Created KinD cluster ${{ matrix.k8s_version }} successfully.<br /> | |
Installing charts and validating ...<br /><br /> | |
- name: Run chart-testing (install) | |
id: ct | |
run: | | |
{ | |
echo 'TEST_STATUS<<EOF' | |
ct install --config .github/ct-install.yaml 2>&1 || echo 'failed' | |
echo | |
echo 'EOF' | |
} >> "$GITHUB_ENV" | |
echo $GITHUB_ENV | |
- name: Run kubeconform | |
uses: nlamirault/helm-kubeconform-action@v0.2.0 | |
id: kubeconform | |
with: | |
charts: . | |
- name: Comment (after test success) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ success() && github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
reactions: hooray | |
body: | | |
<details> | |
<summary>Testing chart result </summary> | |
``` | |
${{ env.TEST_STATUS }} | |
``` | |
</details> | |
- name: Comment (after test failure) | |
uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ failure() && github.event.pull_request.number }} | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-id: ${{ steps.comment.outputs.comment-id }} | |
edit-mode: append | |
reactions: -1 | |
body: | | |
<details> | |
<summary>Testing chart failure! :no_good:</summary> | |
``` | |
${{ env.TEST_STATUS }} | |
``` | |
</details> |