Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This GitHub Action checks for changed files in a Git repository and validates th
| checked_location | Enter the location of the files, separated by `;`. Example: `src/;docs/test.txt;tests/test*` | true | |
| git_location | Path to the Git repository. | false | (current working directory) |
| check_all_files | Enables the check of all defined files and folders in the directory. | false | false |
| github_user_token | Define the used GitHub server user token for Github.com. | false | "" |

---

Expand Down
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: "Enables the check of all defined files and folders in the directory"
default: "false"
required: false
github_user_token:
description: "Define the used GitHub server user token for Github.com"
default: ""
required: false
outputs:
files_changed:
description: "Returns true if changed files are detected and false by default"
Expand Down Expand Up @@ -50,8 +54,11 @@ runs:

# Download the check_changed_files.py script
echo "Downloading check_changed_files.py script..."
echo $ACTION_REF
curl -s -L -o /tmp/check_changed_files.py https://raw.githubusercontent.com/ZPascal/check-changed-files-action/refs/heads/$ACTION_REF/src/check_changed_files.py
AUTH_PREFIX=""
if [ -n "${{ inputs.github_user_token }}" ]; then
AUTH_PREFIX="oauth2:${{ inputs.github_user_token }}@"
fi
curl -s -L -o /tmp/check_changed_files.py https://${AUTH_PREFIX}raw.githubusercontent.com/ZPascal/check-changed-files-action/refs/heads/$ACTION_REF/src/check_changed_files.py

optional_flags=""
if [ -n "${{ inputs.git_location }}" ]; then
Expand Down