Skip to content

Commit

Permalink
Merge pull request #22 from yelizariev/custom-repo-path
Browse files Browse the repository at this point in the history
Add "repository" option for custom repository path
  • Loading branch information
stefanzweifel authored Dec 10, 2019
2 parents d338d7d + d3ceaca commit 3c148f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
file_pattern: src/\*.js

# Optional repository path
repository: .

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: File pattern used for "git add"
required: false
default: '.'
repository:
description: Path to repository
required: false
default: '.'

runs:
using: 'docker'
Expand All @@ -26,6 +30,7 @@ runs:
- ${{ inputs.commit_options }}
- ${{ inputs.branch }}
- ${{ inputs.file_pattern }}
- ${{ inputs.repository }}

branding:
icon: 'git-commit'
Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ EOF
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
echo "Checking for uncommitted changes in the git working tree."
if [[ -n "$(git status -s)" ]]
Expand Down

0 comments on commit 3c148f8

Please sign in to comment.