-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,441 changed files
with
57,595 additions
and
36,759 deletions.
There are no files selected for viewing
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
79 changes: 79 additions & 0 deletions
79
.github/workflows/auto-update-helm-and-operator-version-by-release.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Update Helm Charts and Risingwave Operator on New Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'release version' | ||
required: true | ||
|
||
env: | ||
NEW_APP_VERSION: ${{ github.event.inputs.version || github.event.release.tag_name }} | ||
|
||
jobs: | ||
update-helm-charts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Helm Charts Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'risingwavelabs/helm-charts' | ||
token: ${{ secrets.PR_TOKEN }} | ||
path: 'helm-charts' | ||
|
||
- name: Update values.yaml | ||
run: | | ||
sed -i "s/^ tag:.*/ tag: \"${{ env.NEW_APP_VERSION }}\"/" helm-charts/charts/risingwave/values.yaml | ||
- name: Update Chart.yaml | ||
run: | | ||
cd helm-charts/charts/risingwave | ||
CURRENT_VERSION=$(grep 'version:' Chart.yaml | awk '{print $2}' | head -n 1) | ||
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS='.' '{$NF++; print}') | ||
sed -i "/type: application/,/version:/!b; /version:/s/version: .*/version: $NEW_VERSION/" Chart.yaml | ||
sed -i "s/^appVersion: .*/appVersion: \"${{ env.NEW_APP_VERSION }}\"/" Chart.yaml | ||
echo "NEW_CHART_VERSION=$NEW_VERSION" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.PR_TOKEN }} | ||
commit-message: 'chore: bump risingwave to ${{ env.NEW_APP_VERSION }}, release chart ${{ env.NEW_CHART_VERSION }}' | ||
title: 'chore: bump risingwave to ${{ env.NEW_APP_VERSION }}, release chart ${{ env.NEW_CHART_VERSION }}' | ||
body: 'This is an automated pull request to update the chart versions' | ||
branch: 'auto-update-${{ env.NEW_APP_VERSION }}' | ||
path: 'helm-charts' | ||
reviewers: arkbriar | ||
delete-branch: true | ||
signoff: true | ||
|
||
update-risingwave-operator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Risingwave Operator Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'risingwavelabs/risingwave-operator' | ||
token: ${{ secrets.PR_TOKEN }} | ||
path: 'risingwave-operator' | ||
|
||
- name: Update risingwave-operator image tags | ||
run: | | ||
cd risingwave-operator | ||
PREV_VERSION=$(grep -roh "risingwavelabs/risingwave:v[0-9\.]*" * | head -n 1 | cut -d':' -f2) | ||
grep -rl "risingwavelabs/risingwave:$PREV_VERSION" . | xargs sed -i "s|risingwavelabs/risingwave:$PREV_VERSION|risingwavelabs/risingwave:${{ env.NEW_APP_VERSION }}|g" | ||
- name: Create Pull Request for risingwave-operator | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.PR_TOKEN }} | ||
commit-message: 'chore: bump risingwave image tags to ${{ env.NEW_APP_VERSION }}' | ||
title: 'chore: bump risingwave image tags to ${{ env.NEW_APP_VERSION }}' | ||
body: 'This is an automated pull request to update the risingwave image tags' | ||
branch: 'auto-update-${{ env.NEW_APP_VERSION }}' | ||
path: 'risingwave-operator' | ||
reviewers: arkbriar | ||
delete-branch: true | ||
signoff: true |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Package Version Checker | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
compare-package-version-with-latest-release-version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: List branches | ||
run: | | ||
git fetch --all | ||
release_branches=$(git branch -r | grep -E 'origin/release-[0-9]+\.[0-9]+' | sed 's/origin\///') | ||
echo "Release branches:" | ||
echo "$release_branches" | ||
echo "$release_branches" > release_branches.txt | ||
- name: Pick latest release branch | ||
run: | | ||
release_branches=$(cat release_branches.txt) | ||
latest_branch=$(echo "$release_branches" | sort -t. -k1,1 -k2,2 -Vr | head -n 1) | ||
echo "Latest release branch: $latest_branch" | ||
latest_version=$(echo "$latest_branch" | sed -E 's/release-([0-9]+\.[0-9]+)/\1/' | sed 's/^[ \t]*//') | ||
echo "Latest release version: $latest_version" | ||
echo "$latest_version" > latest_release_version.txt | ||
- name: Read Cargo.toml version | ||
run: | | ||
cargo_version=$(grep -oP '(?<=^version = ")[0-9]+\.[0-9]+' Cargo.toml) | ||
echo "Cargo.toml version: $cargo_version" | ||
echo "$cargo_version" > cargo_version.txt | ||
- name: Compare versions | ||
run: | | ||
latest_version=$(cat latest_release_version.txt) | ||
cargo_version=$(cat cargo_version.txt) | ||
latest_major=$(echo $latest_version | cut -d. -f1) | ||
latest_minor=$(echo $latest_version | cut -d. -f2) | ||
cargo_major=$(echo $cargo_version | cut -d. -f1) | ||
cargo_minor=$(echo $cargo_version | cut -d. -f2) | ||
if [ "$cargo_major" -lt "$latest_major" ] || { [ "$cargo_major" -eq "$latest_major" ] && [ "$cargo_minor" -le "$latest_minor" ]; }; then | ||
echo "Error: Cargo.toml package version $cargo_version is not larger than $latest_version" | ||
exit 1 | ||
else | ||
echo "Cargo.toml version $cargo_version is larger than or equal to $latest_version" | ||
fi |
Oops, something went wrong.