File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 matrix :
88 os : [ ubuntu-latest, macos-latest, windows-latest ]
99 steps :
10- - uses : actions/checkout@v3
10+ - uses : actions/checkout@v6
1111 with :
1212 ref : ${{ github.head_ref }}
1313 fetch-depth : 0
14- - uses : actions/setup-python@v4
14+ - uses : actions/setup-python@v6
1515 with :
1616 python-version : " 3.11"
1717 - name : Get the commit message
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ exceeds a threshold.
2222
2323## Usage
2424``` yaml
25- - uses : ccdc-opensource/commit-hooks@v6
25+ - uses : ccdc-opensource/commit-hooks@v7
2626 with :
2727 commitMessage : ' The commit message'
2828` ` `
@@ -38,18 +38,18 @@ jobs:
3838 Pull-request-files-check :
3939 runs-on : ubuntu-latest
4040 steps :
41- - uses : actions/checkout@v3
41+ - uses : actions/checkout@v6
4242 with :
4343 ref : ${{ github.head_ref }}
4444 fetch-depth : 0
45- - uses : actions/setup-python@v4
45+ - uses : actions/setup-python@v6
4646 with :
47- python-version : " 3.7 "
47+ python-version : " 3.11 "
4848 - name : Get the commit message
4949 run : |
5050 echo "commit_message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
5151 shell : bash
52- - uses : ccdc-opensource/commit-hooks@v6
52+ - uses : ccdc-opensource/commit-hooks@v7
5353 with :
5454 commitMessage : ${{ env.commit_message }}
5555` ` `
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ me=$(basename "$0")
44case " $OSTYPE " in
55 msys* |mingw* |cygwin* |win32* )
66 echo " Running ${me} on Windows"
7- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
7+ if command -v python3 > /dev/null 2>&1 ; then
88 PYTHON_EXECUTABLE=(python3)
9- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
9+ elif command -v python > /dev/null 2>&1 ; then
1010 PYTHON_EXECUTABLE=(python)
1111 else
1212 echo " Error: Python not found or not runnable"
@@ -15,9 +15,9 @@ case "$OSTYPE" in
1515 ;;
1616 * )
1717 echo " Running ${me} on linux / mac / unix"
18- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
18+ if command -v python3 > /dev/null 2>&1 ; then
1919 PYTHON_EXECUTABLE=(python3)
20- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
20+ elif command -v python > /dev/null 2>&1 ; then
2121 PYTHON_EXECUTABLE=(python)
2222 else
2323 echo " Error: Python not found or not runnable"
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ me=$(basename "$0")
44case " $OSTYPE " in
55 msys* |mingw* |cygwin* |win32* )
66 echo " Running ${me} on Windows"
7- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
7+ if command -v python3 > /dev/null 2>&1 ; then
88 PYTHON_EXECUTABLE=(python3)
9- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
9+ elif command -v python > /dev/null 2>&1 ; then
1010 PYTHON_EXECUTABLE=(python)
1111 else
1212 echo " Error: Python not found or not runnable"
@@ -15,9 +15,9 @@ case "$OSTYPE" in
1515 ;;
1616 * )
1717 echo " Running ${me} on linux / mac / unix"
18- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
18+ if command -v python3 > /dev/null 2>&1 ; then
1919 PYTHON_EXECUTABLE=(python3)
20- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
20+ elif command -v python > /dev/null 2>&1 ; then
2121 PYTHON_EXECUTABLE=(python)
2222 else
2323 echo " Error: Python not found or not runnable"
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ me=$(basename "$0")
44case " $OSTYPE " in
55 msys* |mingw* |cygwin* |win32* )
66 echo " Running ${me} on Windows"
7- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
7+ if command -v python3 > /dev/null 2>&1 ; then
88 PYTHON_EXECUTABLE=(python3)
9- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
9+ elif command -v python > /dev/null 2>&1 ; then
1010 PYTHON_EXECUTABLE=(python)
1111 else
1212 echo " Error: Python not found or not runnable"
@@ -15,9 +15,9 @@ case "$OSTYPE" in
1515 ;;
1616 * )
1717 echo " Running ${me} on linux / mac / unix"
18- if command -v python3 > /dev/null 2>&1 && python3 -c " import sys " > /dev/null 2>&1 ; then
18+ if command -v python3 > /dev/null 2>&1 ; then
1919 PYTHON_EXECUTABLE=(python3)
20- elif command -v python > /dev/null 2>&1 && python -c " import sys " > /dev/null 2>&1 ; then
20+ elif command -v python > /dev/null 2>&1 ; then
2121 PYTHON_EXECUTABLE=(python)
2222 else
2323 echo " Error: Python not found or not runnable"
You can’t perform that action at this time.
0 commit comments