Update Helm release postgresql-ha to v15 #4671
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: "Pullrequest" | |
on: | |
pull_request: | |
jobs: | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: ibiqlik/action-yamllint@v3 | |
id: lint | |
continue-on-error: true | |
with: | |
file_or_dir: . | |
format: standard | |
config_file: .yamllint.yml | |
- name: single-line | |
id: lint-output | |
if: steps.lint.outcome != 'success' | |
run: | | |
echo "logfile=$(sed ':a;N;$!ba;s/\n/{newline}/g' < ${{ steps.lint.outputs.logfile }} )" >> $GITHUB_OUTPUT | |
- name: Augment PR with yamllint infos | |
uses: actions/[email protected] | |
if: steps.lint.outcome != 'success' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = `#### yamllint: π\`${{ steps.kubeval.outcome }}\` | |
<details><summary>Show results</summary> | |
\`\`\` | |
${{ steps.lint-output.outputs.logfile }} | |
\`\`\` | |
</details> | |
__Author:__ @${{ github.actor }}, | |
__Action:__ \`${{ github.event_name }}\``; | |
new_output = output.replace(/{newline}/g, "\n"); | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: new_output | |
}) | |
- name: Fail pipeline if previously failed | |
if: steps.lint.outcome != 'success' | |
run: exit 1 | |
kubeval_manifests: | |
name: "run kubeval on plain K8s manifests" | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: cedi-dev/gh-action-install-kubeval@main | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Kubeval | |
id: kubeval | |
continue-on-error: true | |
run: | | |
set -e | |
touch kubeval.txt | |
for manifest in ./manifests/*/*.yaml | |
do | |
echo "$manifests" | |
kubeval --ignore-missing-schemas --strict --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/ $manifest | tee -a kubeval.txt | |
done | |
echo "kubeval=$(sed ':a;N;$!ba;s/\n/{newline}/g' < kubeval.txt)" >> $GITHUB_OUTPUT | |
- name: Augment PR with kubeval infos | |
uses: actions/[email protected] | |
if: steps.kubeval.outcome != 'success' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = `#### Kubeval manifests: π\`${{ steps.kubeval.outcome }}\` | |
<details><summary>Show results</summary> | |
\`\`\` | |
${{ steps.kubeval.outputs.kubeval }} | |
\`\`\` | |
</details> | |
__Author:__ @${{ github.actor }}, | |
__Action:__ \`${{ github.event_name }}\``; | |
new_output = output.replace(/{newline}/g, "\n"); | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: new_output | |
}) | |
- name: Fail pipeline if previously failed | |
if: steps.kubeval.outcome != 'success' | |
run: exit 1 | |
kubeval_charts: | |
name: "run kubeval on charts" | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: cedi-dev/gh-action-install-kubeval@main | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Charts | |
id: kubeval | |
continue-on-error: true | |
run: | | |
set -e | |
touch kubeval.txt | |
for chart in ./charts/*/ | |
do | |
echo "$chart" | |
for app in $stage*/ | |
do | |
echo "$chart" | |
pushd $chart | |
pwd | |
helm dependency update | |
helm template . --values ./values.yaml | kubeval --ignore-missing-schemas --strict | tee -a kubeval.txt | |
popd | |
done | |
done | |
echo "kubeval=$(sed ':a;N;$!ba;s/\n/{newline}/g' < kubeval.txt)" >> $GITHUB_OUTPUT | |
- name: Augment PR with kubeval infos | |
uses: actions/[email protected] | |
if: steps.kubeval.outcome != 'success' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = `#### Kubeval charts: π\`${{ steps.kubeval.outcome }}\` | |
<details><summary>Show results</summary> | |
\`\`\` | |
${{ steps.kubeval.outputs.kubeval }} | |
\`\`\` | |
</details> | |
__Author:__ @${{ github.actor }}, | |
__Action:__ \`${{ github.event_name }}\``; | |
new_output = output.replace(/{newline}/g, "\n"); | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: new_output | |
}) | |
- name: Fail pipeline if previously failed | |
if: steps.kubeval.outcome != 'success' | |
run: exit 1 | |
kubeval_kustomize: | |
name: "run kubeval on Kustomize overlays" | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: cedi-dev/gh-action-install-kubeval@main | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Kustomize | |
id: kubeval | |
run: | | |
set -e | |
touch kubeval.txt | |
for kust in ./kustomize/overlays/*/* | |
do | |
echo "$kust" | |
kustomize build --enable-alpha-plugins --enable-helm $kust | kubeval --ignore-missing-schemas --strict | tee -a kubeval.txt | |
done | |
echo "kubeval=$(sed ':a;N;$!ba;s/\n/{newline}/g' < kubeval.txt)" >> $GITHUB_OUTPUT | |
- name: Augment PR with kubeval infos | |
uses: actions/[email protected] | |
if: steps.kubeval.outcome != 'success' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = `#### Kubeval kustomize: π\`${{ steps.kubeval.outcome }}\` | |
<details><summary>Show results</summary> | |
\`\`\` | |
${{ steps.kubeval.outputs.kubeval }} | |
\`\`\` | |
</details> | |
__Author:__ @${{ github.actor }}, | |
__Action:__ \`${{ github.event_name }}\``; | |
new_output = output.replace(/{newline}/g, "\n"); | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: new_output | |
}) | |
- name: Fail pipeline if previously failed | |
if: steps.kubeval.outcome != 'success' | |
run: exit 1 |