forked from opendatahub-io/kserve
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from israel-hdez/redhatds-v0121-sync
Bump red-hat-ds to KServe v0.12.1
- Loading branch information
Showing
505 changed files
with
252,948 additions
and
17,811 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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Automated Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseBranch: | ||
description: 'The existing branch name to release from, e.g. release-0.12' | ||
required: true | ||
releaseTag: | ||
description: 'The release tag, e.g. v0.12.0-rc1' | ||
required: true | ||
|
||
jobs: | ||
prepare-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ inputs.releaseBranch }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
go mod download | ||
- name: Prepare Release | ||
shell: bash | ||
run: | | ||
GOPATH=$(go env GOPATH) | ||
KSERVE_PATH=$GOPATH/src/github.com/kserve/kserve | ||
echo "KSERVE_PATH=$KSERVE_PATH" >> "$GITHUB_ENV" | ||
mkdir -p $KSERVE_PATH | ||
cp -a . $KSERVE_PATH | ||
cd $KSERVE_PATH | ||
export RELEASE_BRANCH=${{ inputs.releaseBranch }} | ||
export RELEASE_TAG=${{ inputs.releaseTag }} | ||
# Bump Versions | ||
make bump-version | ||
./hack/generate-install.sh $RELEASE_TAG | ||
./hack/python-release.sh | ||
# Update Release Branch and Push Tag | ||
git diff | ||
git config --global user.email "terrytangyuan@gmail.com" | ||
git config --global user.name "terrytangyuan" | ||
git add -A | ||
git commit -m "Prepare release" || exit 0 | ||
git push | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
prerelease: ${{ contains(inputs.releaseTag, 'rc') }} | ||
target_commitish: ${{ inputs.releaseBranch }} | ||
tag_name: ${{ inputs.releaseTag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,103 @@ | ||
name: Create Tag and Release with Changelog | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Tag name for the new release' | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
pull-requests: write | ||
|
||
jobs: | ||
fetch-tag: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
old_tag: ${{ steps.get_tag.outputs.old_tag_name }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Get latest tag | ||
id: get_tag | ||
run: | | ||
echo "old_tag_name=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | grep -v '{}' | sort -V | tail -n1)" >> $GITHUB_OUTPUT | ||
- name: print tag | ||
id: print_tag | ||
run: | | ||
echo "Old Tag=${{ steps.get_tag.outputs.old_tag_name }}" | ||
echo "NEW_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV | ||
echo "$(basename ${{ github.ref }})" | ||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
import sys | ||
import subprocess | ||
tag_name = "${{ github.event.inputs.tag_name }}" | ||
command = ['git', 'tag', '-l', tag_name] | ||
output = subprocess.check_output(command, stderr=subprocess.STDOUT) | ||
if output.decode() != "": | ||
print(f"Error: Tag '{tag_name}' already exists.", file=sys.stderr) | ||
sys.exit(1) | ||
else: | ||
print(f"Tag '{tag_name}' does not exists.") | ||
shell: python | ||
continue-on-error: false | ||
|
||
#this works only if params.env contains image:tag_version_number | ||
update-params-env: | ||
runs-on: ubuntu-latest | ||
needs: fetch-tag | ||
outputs: | ||
param_env: ${{ steps.read_params_env.outputs.params_env }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Update params.env with new release version | ||
run: | | ||
sed -i 's|:v[0-9.]*\b|:${{ github.event.inputs.tag_name }}|gm' config/overlays/odh/params.env | ||
- name: Commit changes | ||
run: | | ||
git config --global user.email "github-actions@github.com" | ||
git config --global user.name "GitHub Actions" | ||
git add config/overlays/odh/params.env | ||
git commit -m "Update image refs for odh release." | ||
- name: Create Tag | ||
id: create_tag | ||
run: | | ||
git tag -a ${{ github.event.inputs.tag_name }} -m "Prepare for ODH release ${{ github.event.inputs.tag_name }}" | ||
git push origin ${{ github.event.inputs.tag_name }} | ||
changelog: | ||
name: Changelog | ||
needs: [fetch-tag,update-params-env] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
token: ${{ github.token }} | ||
tag_name: ${{ github.event.inputs.tag_name }} | ||
prerelease: false | ||
draft: false | ||
#this takes the path of payload to upload as an asset in the changelog | ||
files: bin/* | ||
generate_release_notes: true | ||
name: ${{ github.event.inputs.tag_name }} |
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
Oops, something went wrong.