Skip to content

Commit 116ec62

Browse files
committed
Merge branch 'query-channel' into query-spider-bench
2 parents 002435e + c5fe49b commit 116ec62

File tree

113 files changed

+7832
-6756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+7832
-6756
lines changed

.github/workflows/clp-lint.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ jobs:
2727
with:
2828
submodules: "recursive"
2929

30-
# Fetch all history for all branches; otherwise, `helm lint` would complain about not
31-
# finding the `origin/main` branch.
32-
fetch-depth: 0
33-
3430
- uses: "actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38"
3531
with:
3632
python-version: "3.11"
@@ -82,7 +78,3 @@ jobs:
8278
- name: "Lint .yaml files"
8379
shell: "bash"
8480
run: "task lint:check-yaml"
85-
86-
- name: "Lint Helm charts"
87-
shell: "bash"
88-
run: "task lint:check-helm"
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: "clp-package-helm"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/clp-package-helm.yaml"
7+
- "taskfiles/helm.yaml"
8+
- "tools/deployment/package-helm/**"
9+
push:
10+
paths:
11+
- ".github/workflows/clp-package-helm.yaml"
12+
- "taskfiles/helm.yaml"
13+
- "tools/deployment/package-helm/**"
14+
workflow_dispatch:
15+
16+
permissions: {}
17+
18+
concurrency:
19+
group: "${{github.workflow}}-${{github.ref}}"
20+
21+
# Cancel in-progress jobs for efficiency
22+
cancel-in-progress: true
23+
24+
jobs:
25+
lint:
26+
runs-on: "ubuntu-24.04"
27+
steps:
28+
- uses: "actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8" # v6.0.1
29+
with:
30+
submodules: "recursive"
31+
32+
# Fetch all history for all branches; otherwise, `helm lint` would complain about not
33+
# finding the `origin/main` branch.
34+
fetch-depth: 0
35+
36+
- name: "Install task"
37+
shell: "bash"
38+
run: "npm install -g @go-task/cli@3.44.0"
39+
40+
- name: "Lint Helm charts"
41+
shell: "bash"
42+
run: "task lint:check-helm"
43+
44+
publish:
45+
# Publish from `main` and `vA.B.C` release branches.
46+
if: >-
47+
github.event_name != 'pull_request'
48+
&& (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v'))
49+
needs: "lint"
50+
runs-on: "ubuntu-24.04"
51+
permissions:
52+
# To push to the `gh-pages` branch.
53+
contents: "write"
54+
steps:
55+
- uses: "actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8" # v6.0.1
56+
with:
57+
submodules: "recursive"
58+
59+
- name: "Install task"
60+
shell: "bash"
61+
run: "npm install -g @go-task/cli@3.44.0"
62+
63+
- name: "Package Helm chart"
64+
shell: "bash"
65+
run: "task helm:package"
66+
67+
- name: "Checkout branch `gh-pages`"
68+
uses: "actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8" # v6.0.1
69+
with:
70+
path: "gh-pages"
71+
ref: "gh-pages"
72+
73+
- name: "Get chart version"
74+
id: "get-chart-version"
75+
uses: "mikefarah/yq@065b200af9851db0d5132f50bc10b1406ea5c0a8" # v4.50.1
76+
with:
77+
cmd: "yq '.version' 'tools/deployment/package-helm/Chart.yaml'"
78+
79+
- name: "Update Helm repository"
80+
id: "update-helm-repo"
81+
shell: "bash"
82+
run: |-
83+
chart_tgz="clp-${{steps.get-chart-version.outputs.result}}.tgz"
84+
85+
# Skip if this chart version already exists.
86+
if [[ -f "gh-pages/${chart_tgz}" ]]; then
87+
echo "Chart ${chart_tgz} already exists, skipping publish."
88+
echo "skip_publish=true" >> "$GITHUB_OUTPUT"
89+
exit 0
90+
fi
91+
92+
cp "build/clp-package-helm"/*.tgz "gh-pages/"
93+
94+
# Update index.yaml, merging with existing index if present.
95+
. "build/toolchains/helm/env"
96+
url="${{github.server_url}}/${{github.repository}}/raw/gh-pages"
97+
if [[ -f "gh-pages/index.yaml" ]]; then
98+
helm repo index "gh-pages" --merge "gh-pages/index.yaml" --url "${url}"
99+
else
100+
helm repo index "gh-pages" --url "${url}"
101+
fi
102+
103+
- name: "Push to gh-pages branch"
104+
if: "steps.update-helm-repo.outputs.skip_publish != 'true'"
105+
shell: "bash"
106+
working-directory: "gh-pages"
107+
run: |-
108+
git config user.name "$GITHUB_ACTOR"
109+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
110+
git add "*.tgz" "index.yaml"
111+
commit_message="ci(helm): Publish clp-${{steps.get-chart-version.outputs.result}}"
112+
commit_message+=" from ${{github.ref_name}} (${{github.sha}})."
113+
git commit -m "$commit_message"
114+
git push

0 commit comments

Comments
 (0)