forked from NVIDIA/k8s-device-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
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
20 changed files
with
667 additions
and
106 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,51 @@ | ||
# Copyright 2024 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Run this workflow on new tags | ||
name: Publish Helm Chart | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
update-helm-charts: | ||
name: Update gh-pages branch helm charts and index | ||
runs-on: ubuntu-latest | ||
env: | ||
HELM_REPO_PATH: releases/helm-${{ github.event.release.tag_name }}/ | ||
steps: | ||
- name: Install Helm | ||
uses: azure/setup-helm@v4.2.0 | ||
with: | ||
version: 3.14.4 | ||
|
||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Update helm index | ||
env: | ||
VERSION: ${{ github.event.release.tag_name }} | ||
DOWNLOAD_URL: ${{ join(github.event.release.assets.*.browser_download_url, ' ') }} | ||
run: | | ||
git config user.name "Github Actions" | ||
git config user.email "no-reply@github.com" | ||
./hack/update-helm-index.sh --helm-repo-path $HELM_REPO_PATH $DOWNLOAD_URL | ||
- name: Push updated Helm charts and index to gh-pages branch | ||
run: | | ||
git -C $HELM_REPO_PATH push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages |
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,43 @@ | ||
# Copyright 2024 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Run this workflow on new tags | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Check out code | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v4.2.0 | ||
with: | ||
version: 3.14.4 | ||
|
||
- name: Generate Helm Charts | ||
run: | | ||
./hack/package-helm-charts.sh ${{ github.ref_name }} | ||
- name: Create Draft Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
./hack/create-release.sh ${{ github.ref_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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 2024 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
if [ -z "$1" ]; then | ||
VERSION=$(awk -F= '/^VERSION/ { print $2 }' versions.mk | tr -d '[:space:]') | ||
else | ||
VERSION=$1 | ||
fi | ||
|
||
PRERELEASE_FLAG="" | ||
if [[ ${VERSION} == v*-rc.* ]]; then | ||
PRERELEASE_FLAG="--prerelease" | ||
fi | ||
|
||
REPOSITORY=NVIDIA/k8s-device-plugin | ||
|
||
echo "Creating draft release" | ||
./hack/generate-changelog.sh --version ${VERSION} --since ${REFERENCE} | \ | ||
grep -v "### Version v" | \ | ||
gh release create ${VERSION} --notes-file "-" \ | ||
--draft \ | ||
--title "${VERSION}" \ | ||
-R "${REPOSITORY}" \ | ||
--verify-tag \ | ||
--prerelease | ||
|
||
HELM_PACKAGE_VERSION=${VERSION#v} | ||
echo "Uploading release artifacts" | ||
|
||
gh release upload ${VERSION} \ | ||
./nvidia-device-plugin-${HELM_PACKAGE_VERSION}.tgz \ | ||
./gpu-feature-discovery-${HELM_PACKAGE_VERSION}.tgz \ | ||
-R ${REPOSITORY} |
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
Oops, something went wrong.