mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-11-06 02:08:05 +00:00
Add "repository" option for custom repository path
This commit is contained in:
parent
d338d7dd00
commit
d3ceacae7d
@ -23,6 +23,10 @@ Add the following step at the end of your job.
|
|||||||
|
|
||||||
# Optional glob pattern of files which should be added to the commit
|
# Optional glob pattern of files which should be added to the commit
|
||||||
file_pattern: src/\*.js
|
file_pattern: src/\*.js
|
||||||
|
|
||||||
|
# Optional repository path
|
||||||
|
repository: .
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
@ -17,6 +17,10 @@ inputs:
|
|||||||
description: File pattern used for "git add"
|
description: File pattern used for "git add"
|
||||||
required: false
|
required: false
|
||||||
default: '.'
|
default: '.'
|
||||||
|
repository:
|
||||||
|
description: Path to repository
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
@ -26,6 +30,7 @@ runs:
|
|||||||
- ${{ inputs.commit_options }}
|
- ${{ inputs.commit_options }}
|
||||||
- ${{ inputs.branch }}
|
- ${{ inputs.branch }}
|
||||||
- ${{ inputs.file_pattern }}
|
- ${{ inputs.file_pattern }}
|
||||||
|
- ${{ inputs.repository }}
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: 'git-commit'
|
icon: 'git-commit'
|
||||||
|
@ -19,6 +19,10 @@ EOF
|
|||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "INPUT_REPOSITORY value: $INPUT_REPOSITORY";
|
||||||
|
|
||||||
|
cd $INPUT_REPOSITORY
|
||||||
|
|
||||||
# This section only runs if there have been file changes
|
# This section only runs if there have been file changes
|
||||||
echo "Checking for uncommitted changes in the git working tree."
|
echo "Checking for uncommitted changes in the git working tree."
|
||||||
if [[ -n "$(git status -s)" ]]
|
if [[ -n "$(git status -s)" ]]
|
||||||
|
Loading…
Reference in New Issue
Block a user