Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ very quickly. Please check the results. We would like these checks to pass befor
even continue reviewing your changes.
-->

#### What this PR does / why we need it:
#### What this PR does / why we need it

#### Which issue this PR fixes

*(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*
- fixes #

#### Special notes for your reviewer:
- fixes #

#### Special notes for your reviewer

#### Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

- [ ] [DCO](https://github.com/helm/charts/blob/master/CONTRIBUTING.md#sign-your-work) signed
- [ ] Chart Version bumped
- [ ] Variables are documented in the README.md
45 changes: 0 additions & 45 deletions .github/workflows/basic_test.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint & Test Chart

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
chart-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up chart-testing
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0
- name: Run lint check
id: lint
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
if: steps.lint.outcome == 'success'
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
- name: Run chart-testing (install)
if: steps.lint.outcome == 'success'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-args --timeout 180s
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: publish-postgresql-helm-chart

on:
push:
branches: ['master']
paths:
- 'templates/**'
- 'Chart.yaml'

jobs:
build-and-push-postgresql-helm-chart-to-ghcr:
name: Build and push PostgreSQL Helm chart to GHCR
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Package and upload chart
shell: bash
env:
REGISTRY: "ghcr.io"
REPOSITORY: "${{ github.repository }}"
TOKEN: "${{ secrets.GITHUB_TOKEN }}"
USER: "${{ github.repository_owner }}"
run: |
rm -rf dist
mkdir dist
helm package . -d dist/
echo "${TOKEN}" | helm registry login "${REGISTRY}/${REPOSITORY,,}" -u "${USER}" --password-stdin
helm push dist/*.tgz "oci://${REGISTRY}/${REPOSITORY,,}/charts"

build-and-push-postgresql-helm-chart-to-dockerhub:
name: Build and push PostgreSQL Helm chart to Docker Hub
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Package chart
shell: bash
run: |
rm -rf dist
mkdir dist
helm package . -d dist/
- name: Login and push to Docker Hub
shell: bash
env:
REGISTRY: "docker.io"
USERNAME: "${{ secrets.DOCKER_HUB_USERNAME }}"
PASSWORD: "${{ secrets.DOCKER_HUB_TOKEN }}"
REPOSITORY: "applause/postgresql"
run: |
echo "${PASSWORD}" | helm registry login "${REGISTRY}" -u "${USERNAME}" --password-stdin
helm push dist/*.tgz "oci://${REGISTRY}/${REPOSITORY}"