Skip to content

Commit 690aab4

Browse files
chore: Configure repository for ParadeDB (#15)
Co-authored-by: Itay Grudev <itay+github.com@grudev.com>
1 parent d99bd84 commit 690aab4

35 files changed

+1081
-733
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Order is important. The last matching pattern has the most precedence. In each subsection folders are ordered first by depth, then alphabetically
2+
3+
/.github/ @philippemnoel
4+
/charts/ @philippemnoel

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [paradedb] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Bug Description**
10+
Please describe the bug.
11+
12+
**How To Reproduce**
13+
Please describe how to reproduce the bug.
14+
15+
**Proposed Fix**
16+
Please describe how you think this bug could be fixed.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**What**
10+
Please describe the feature.
11+
12+
**Why**
13+
Please describe why this feature is important.
14+
15+
**How**
16+
Please describe how you'd implement this feature.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ticket(s) Closed
2+
3+
- Closes #
4+
5+
## What
6+
7+
## Why
8+
9+
## How
10+
11+
## Tests

.github/config/cr.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Reference: https://github.com/helm/chart-releaser
2+
index-path: "./index.yaml"
3+
4+
# PGP signing
5+
sign: true
6+
key: ParadeDB
7+
# keyring: # Set via env variable CR_KEYRING
8+
# passphrase-file: # Set via env variable CR_PASSPHRASE_FILE
9+
10+
# Enable automatic generation of release notes using GitHub's release notes generator.
11+
# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
12+
generate-release-notes: true

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
ignore:
9+
- dependency-name: "*"
10+
update-types: ["version-update:semver-patch"]
11+
groups:
12+
github-actions-dependencies:
13+
patterns:
14+
- "*"

.github/renovate.json5

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# workflows/paradedb-publish-chart.yml
2+
#
3+
# ParadeDB Publish Chart
4+
# Publish the ParadeDB Helm chart to paradedb.github.io via GitHub Pages. This workflow also
5+
# triggers the creation of a GitHub Release. It only runs on pushes to `main` or when we trigger
6+
# a workflow_dispatch event, either manually or via creating a release in `paradedb/paradedb`.
7+
8+
name: ParadeDB Publish Chart
9+
10+
on:
11+
push:
12+
branches:
13+
- main
14+
workflow_dispatch:
15+
inputs:
16+
appVersion:
17+
description: "The ParadeDB version to publish in the Helm Chart (e.g. 0.1.0)"
18+
required: true
19+
default: ""
20+
21+
concurrency:
22+
group: paradedb-publish-chart-${{ github.head_ref || github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
paradedb-publish-chart:
27+
name: Publish ParadeDB Helm Charts to GitHub Pages
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Configure Git
37+
run: |
38+
git config user.name "$GITHUB_ACTOR"
39+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
40+
41+
- name: Set Helm Chart Release Versions
42+
id: set_versions
43+
working-directory: charts/cluster/
44+
env:
45+
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
46+
run: |
47+
# If no appVersion is provided, we use the latest ParadeDB version
48+
if [ -z "${{ github.event.inputs.appVersion }}" ]; then
49+
LATEST_TAG=$(curl -s https://api.github.com/repos/paradedb/paradedb/tags | jq -r '.[0].name')
50+
APP_VERSION=${LATEST_TAG#v}
51+
else
52+
APP_VERSION=${{ github.event.inputs.appVersion }}
53+
fi
54+
# Update appVersion to the GitHub Release version and version to the Helm Chart version
55+
sed -i "s/^[[:space:]]*paradedb: .*/ paradedb: \"$APP_VERSION\"/" values.yaml
56+
sed -i "s/^version: .*/version: ${{ vars.CHART_VERSION_MAJOR }}.${{ vars.CHART_VERSION_MINOR }}.${{ vars.CHART_VERSION_PATCH }}/" Chart.yaml
57+
echo "values.yaml:"
58+
cat values.yaml
59+
echo "----------------------------------------"
60+
echo "Chart.yaml:"
61+
cat Chart.yaml
62+
63+
# Set output to update post-release, increasing the Helm Chart version patch number by one to update in GitHub Actions Variables
64+
echo "new_chart_version_patch=$(( ${{ vars.CHART_VERSION_PATCH }} + 1 ))" >> $GITHUB_OUTPUT
65+
66+
# The GitHub repository secret `PARADEDB_PGP_PRIVATE_KEY` contains the private key
67+
# in ASCII-armored format. To export a (new) key, run this command:
68+
# `gpg --armor --export-secret-key <my key>`
69+
- name: Prepare ParadeDB PGP Key
70+
env:
71+
PGP_PRIVATE_KEY: "${{ secrets.PARADEDB_PGP_PRIVATE_KEY }}"
72+
PGP_PASSPHRASE: "${{ secrets.PARADEDB_PGP_PASSPHRASE }}"
73+
run: |
74+
IFS=""
75+
echo "$PGP_PRIVATE_KEY" | gpg --dearmor --verbose > /tmp/secring.gpg
76+
echo "$PGP_PASSPHRASE" > /tmp/passphrase.txt
77+
78+
# Tell chart-releaser-action where to find the key and its passphrase
79+
echo "CR_KEYRING=/tmp/secring.gpg" >> "$GITHUB_ENV"
80+
echo "CR_PASSPHRASE_FILE=/tmp/passphrase.txt" >> "$GITHUB_ENV"
81+
82+
- name: Add Grafana Chart Dependencies
83+
run: helm repo add cnpg-grafana-dashboard https://cloudnative-pg.github.io/grafana-dashboards
84+
85+
- name: Run chart-releaser
86+
uses: helm/chart-releaser-action@v1.6.0
87+
with:
88+
config: "./.github/config/cr.yaml"
89+
env:
90+
CR_TOKEN: "${{ secrets.GHA_CREATE_RELEASE_PAT }}"
91+
92+
# We have a separate version for our Helm Chart, since it needs to always increment by
93+
# one for every production release, independently of the ParadeDB version. Any non-patch
94+
# version increment should be done manually in GitHub Actions Variables.
95+
- name: Increment Helm Chart Version Number in GitHub Actions Variables
96+
env:
97+
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
98+
run: |
99+
gh api \
100+
--method PATCH \
101+
-H "Accept: application/vnd.github+json" \
102+
-H "X-GitHub-Api-Version: 2022-11-28" \
103+
/repos/paradedb/charts/actions/variables/CHART_VERSION_PATCH \
104+
-f name='CHART_VERSION_PATCH' \
105+
-f value='${{ steps.set_versions.outputs.new_chart_version_patch }}'
106+
107+
- name: Securely Delete the PGP Key and Passphrase
108+
if: always()
109+
run: shred --remove=wipesync /tmp/secring.gpg /tmp/passphrase.txt

.github/workflows/release-pr.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/release-publish.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/tests-cluster-chainsaw.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616

17+
- name: Set ParadeDB Version to Latest
18+
working-directory: charts/cluster/
19+
env:
20+
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
21+
run: |
22+
LATEST_TAG=$(curl -s https://api.github.com/repos/paradedb/paradedb/tags | jq -r '.[0].name')
23+
APP_VERSION=${LATEST_TAG#v}
24+
sed -i "s/^[[:space:]]*paradedb: .*/ paradedb: \"$APP_VERSION\"/" values.yaml
25+
sed -i "s/^version: .*/version: ${{ vars.CHART_VERSION_MAJOR }}.${{ vars.CHART_VERSION_MINOR }}.${{ vars.CHART_VERSION_PATCH }}/" Chart.yaml
26+
echo "values.yaml:"
27+
cat values.yaml
28+
echo "----------------------------------------"
29+
echo "Chart.yaml:"
30+
cat Chart.yaml
31+
1732
- name: Setup kind
1833
uses: ./.github/actions/setup-kind
1934

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ charts/**/charts/*.tgz
1616
# Output of the go coverage tool, specifically when used with LiteIDE
1717
*.out
1818

19-
# editor and IDE paraphernalia
19+
# Editor and IDE paraphernalia
2020
.idea
2121
*.swp
2222
*.swo
2323
*~
24+
25+
# macOS
26+
.DS_Store

.markdownlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MD013: false # Line length
2+
MD026: false # Trailing punctuation in header
3+
MD029: false # Ordered list item prefix
4+
MD033: false # Inline HTML

0 commit comments

Comments
 (0)