Update action.yml (#303)
Signed-off-by: Glenn Jocher <[email protected]>
This commit is contained in:
+9
-4
@@ -72,9 +72,11 @@ runs:
|
||||
# For debug:
|
||||
# python -m pip install --upgrade pip wheel
|
||||
# pip install -q git+https://github.com/ultralytics/actions@main codespell tomli
|
||||
env:
|
||||
INPUTS_SPELLING: ${{ inputs.spelling }}
|
||||
run: |
|
||||
packages="ultralytics-actions"
|
||||
if [ "${{ inputs.spelling }}" = "true" ]; then
|
||||
if [ "$INPUTS_SPELLING" = "true" ]; then
|
||||
packages="$packages codespell tomli"
|
||||
fi
|
||||
|
||||
@@ -210,10 +212,13 @@ runs:
|
||||
# Commit Changes ---------------------------------------------------------------------------------------------------
|
||||
- name: Commit and Push Changes
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action != 'closed'
|
||||
env:
|
||||
GITHUB_USERNAME: ${{ inputs.github_username }}
|
||||
GITHUB_EMAIL: ${{ inputs.github_email }}
|
||||
run: |
|
||||
git config --global user.name "${{ inputs.github_username }}"
|
||||
git config --global user.email "${{ inputs.github_email }}"
|
||||
git pull origin ${{ github.head_ref || github.ref }}
|
||||
git config --global user.name "$GITHUB_USERNAME"
|
||||
git config --global user.email "$GITHUB_EMAIL"
|
||||
git pull
|
||||
git add .
|
||||
git reset HEAD -- .github/workflows/ # workflow changes are not permitted with default token
|
||||
if ! git diff --staged --quiet; then
|
||||
|
||||
Reference in New Issue
Block a user