mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 09:50:20 +08:00
update python version in action with base
This commit is contained in:
parent
51f3f4ff76
commit
76955cc01a
@ -6,5 +6,12 @@
|
||||
"automerge": true,
|
||||
"matchUpdateTypes": ["minor", "patch"]
|
||||
}
|
||||
]
|
||||
],
|
||||
"postUpgradeTasks": {
|
||||
"commands": [
|
||||
"./scripts/post-upgrade.sh {{{depName}}} {{{currentVersion}}} {{{newVersion}}}"
|
||||
],
|
||||
"executionMode": "update",
|
||||
"fileFilters": []
|
||||
}
|
||||
}
|
||||
|
20
update_python_action.sh
Executable file
20
update_python_action.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
action_path=.github/workflows/docker-publish.yml
|
||||
|
||||
# Example usage:
|
||||
# ./update_python_action.sh python 3.12 3.13
|
||||
dependency_name=$1
|
||||
current_version=$2
|
||||
new_version=$3
|
||||
|
||||
# If package is not python, skip
|
||||
if [ "$dependency_name" != "python" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Find and replace python version
|
||||
# with:
|
||||
# python-version: "3.13"
|
||||
|
||||
sed -i "s/python-version: \"$current_version\"/python-version: \"$new_version\"/g" $action_path
|
Loading…
x
Reference in New Issue
Block a user