Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
16e95c3b
Commit
16e95c3b
authored
Nov 09, 2023
by
Jai Luthra
Committed by
Jai Luthra
Nov 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workflows: use workflow dispatch instead of releases
Signed-off-by:
Jai Luthra
<
me@jailuthra.in
>
parent
7b5f3ab9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
32 deletions
+36
-32
.github/workflows/gen_win_patches.yml
.github/workflows/gen_win_patches.yml
+36
-32
No files found.
.github/workflows/gen_win_patches.yml
View file @
16e95c3b
name
:
Generate Windows patches
name
:
Generate Windows patches
on
:
on
:
release
:
workflow_dispatch
:
types
:
inputs
:
-
created
os
:
description
:
'
Operating
System'
required
:
true
default
:
'
win'
type
:
choice
options
:
-
win
-
linux
version
:
description
:
'
Driver
Version'
required
:
true
type
:
string
variant
:
description
:
'
Driver
Variant'
required
:
false
type
:
choice
options
:
-
DCH
-
Studio Driver
-
DCH (Hotfix)
permissions
:
permissions
:
contents
:
write
contents
:
write
...
@@ -14,35 +33,28 @@ jobs:
...
@@ -14,35 +33,28 @@ jobs:
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
steps
:
steps
:
-
name
:
Check
release name and OS
-
name
:
Check
OS and variant
id
:
check_
release
id
:
check_
input
run
:
|
run
:
|
release_name="${{ github.event.release.tag_name }}"
os="${{ inputs.os }}"
echo "Release Name: $release_name"
variant="${{ inputs.variant }}"
if [[ $release_name =~ (win)-(dch|studio)-([0-9]+\.[0-9]+(-[a-zA-Z]+)?)(-.+)? ]]; then
version="${{ inputs.version }}"
os="${BASH_REMATCH[1]}"
variant="${BASH_REMATCH[2]}"
version="${BASH_REMATCH[3]}"
echo "Operating System: $os"
echo "Operating System: $os"
echo "Variant: $variant"
echo "Variant: $variant"
echo "Version: $version"
echo "Version: $version"
if [[ $version =~ ([0-9]+\.[0-9]+(-[a-zA-Z]+)?)(-.+)? ]]; then
if [ "$os" != "win" ]; then
if [ "$os" != "win" ]; then
echo "Not a Windows release. Stopping the CI workflow."
echo "Not a Windows release. Stopping the CI workflow."
exit 0
exit 0
fi
fi
if [ "$variant" == "dch" ]; then
variant="DCH"
elif [ "$variant" == "studio" ]; then
variant="Studio Driver"
fi
echo "OS=$os" >> $GITHUB_ENV
echo "OS=$os" >> $GITHUB_ENV
echo "VARIANT=$variant" >> $GITHUB_ENV
echo "VARIANT=$variant" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
else
else
echo "Invalid
release name format. Must be in the format 'win-dch-123.45' or 'win-studio-123.45'
"
echo "Invalid
driver version.
"
exit 1
exit 1
fi
fi
...
@@ -78,6 +90,8 @@ jobs:
...
@@ -78,6 +90,8 @@ jobs:
python autopatch.py ${{ env.VERSION }}
python autopatch.py ${{ env.VERSION }}
elif [ "${{ env.VARIANT }}" == "Studio Driver" ]; then
elif [ "${{ env.VARIANT }}" == "Studio Driver" ]; then
python autopatch.py https://international.download.nvidia.com/Windows/${{ env.VERSION }}/${{ env.VERSION }}-desktop-win10-win11-64bit-international-nsd-dch-whql.exe
python autopatch.py https://international.download.nvidia.com/Windows/${{ env.VERSION }}/${{ env.VERSION }}-desktop-win10-win11-64bit-international-nsd-dch-whql.exe
elif [ "${{ env.VARIANT }}" == "DCH (Hotfix)" ]; then
python autopatch.py https://international.download.nvidia.com/Windows/${{ env.VERSION }}hf/${{ env.VERSION }}-desktop-notebook-win10-win11-64bit-international-dch.hf.exe
fi
fi
echo "autopatch.py executed successfully"
echo "autopatch.py executed successfully"
...
@@ -106,13 +120,3 @@ jobs:
...
@@ -106,13 +120,3 @@ jobs:
git diff --quiet --exit-code --cached || git commit -m "${{ env.OS }}: add support for ${{ env.VARIANT }} driver ${{ env.VERSION }}"
git diff --quiet --exit-code --cached || git commit -m "${{ env.OS }}: add support for ${{ env.VARIANT }} driver ${{ env.VERSION }}"
git push origin master
git push origin master
echo "Committed and pushed changes"
echo "Committed and pushed changes"
-
name
:
Upload Patch Files
uses
:
softprops/action-gh-release@v1
with
:
files
:
|
${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi64.1337
${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi.1337
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
TAG_NAME
:
${{ github.event.release.tag_name }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment