-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action for version updates (#1073)
* add script for version updates Signed-off-by: Paul S. Schweigert <[email protected]> * action for updating version Signed-off-by: Paul S. Schweigert <[email protected]> * add action Signed-off-by: Paul S. Schweigert <[email protected]> * don't download helm install file Signed-off-by: Paul S. Schweigert <[email protected]> * only action, no script Signed-off-by: Paul S. Schweigert <[email protected]> * use default token Signed-off-by: Paul S. Schweigert <[email protected]> * no token Signed-off-by: Paul S. Schweigert <[email protected]> --------- Signed-off-by: Paul S. Schweigert <[email protected]>
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Update Component Versions | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
new_version: | ||
description: 'version to update to' | ||
required: true | ||
|
||
jobs: | ||
update_component_versions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install helm | ||
shell: bash | ||
run: | | ||
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | ||
- name: Set variables | ||
shell: bash | ||
run: | | ||
NEWNUM=${{ github.event.inputs.new_version }} | ||
OLDTXT=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
OLDNUM="${OLDTXT:1}" | ||
echo "NEWNUM=$NEWNUM" >> "$GITHUB_ENV" | ||
echo "OLDNUM=$OLDNUM" >> "$GITHUB_ENV" | ||
- name: Update observability chart | ||
shell: bash | ||
run: | | ||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/qs-observability/Chart.yaml | ||
sed -i "s/appVersion: \"${OLDNUM}\"/appVersion: \"${NEWNUM}\"/" charts/qs-observability/Chart.yaml | ||
- name: Update quantum-serverless chart | ||
shell: bash | ||
run: | | ||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/quantum-serverless/Chart.yaml | ||
sed -i "s/appVersion: \"${OLDNUM}\"/appVersion: \"${NEWNUM}\"/" charts/quantum-serverless/Chart.yaml | ||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/quantum-serverless/charts/gateway/Chart.yaml | ||
sed -i "s/appVersion: \"${OLDNUM}\"/appVersion: \"${NEWNUM}\"/" charts/quantum-serverless/charts/gateway/Chart.yaml | ||
sed -i "s/ray-node:${OLDNUM}/ray-node:${NEWNUM}/" charts/quantum-serverless/charts/gateway/values.yaml | ||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/quantum-serverless/charts/jupyter/Chart.yaml | ||
sed -i "s/appVersion: \"${OLDNUM}\"/appVersion: \"${NEWNUM}\"/" charts/quantum-serverless/charts/jupyter/Chart.yaml | ||
sed -i "s/version: ${OLDNUM}/version: ${NEWNUM}/" charts/quantum-serverless/charts/repository/Chart.yaml | ||
sed -i "s/appVersion: \"${OLDNUM}\"/appVersion: \"${NEWNUM}\"/" charts/quantum-serverless/charts/repository/Chart.yaml | ||
sed -i "s/tag: \"${OLDNUM}\"/tag: \"${NEWNUM}\"/" charts/quantum-serverless/values.yaml | ||
sed -i "s/tag: \"${OLDNUM}-py39\"/tag: \"${NEWNUM}-py39\"/" charts/quantum-serverless/values.yaml | ||
sed -i "s/ray-node:${OLDNUM}/ray-node:${NEWNUM}/" charts/quantum-serverless/values.yaml | ||
helm dependency update | ||
- name: Update client version | ||
shell: bash | ||
run: | | ||
sed -i "s/${OLDNUM}/${NEWNUM}/" client/quantum_serverless/VERSION.txt | ||
- name: Update compose | ||
shell: bash | ||
run: | | ||
sed -i "s/VERSION:-${OLDNUM}/VERSION:-${NEWNUM}/g" docker-compose.yaml | ||
- name: Update docs | ||
shell: bash | ||
run: | | ||
sed -i "s/${OLDNUM}/${NEWNUM}/g" docs/deployment/cloud.rst | ||
- name: Create PR | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
branch: "update-version-${{ github.event.inputs.new_version }}" | ||
title: "update-version-${{ github.event.inputs.new_version }}" |