8000 Enable git-repo-path to choose its source directory. by titanlien · Pull Request #9 · entrostat/git-secret-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enable git-repo-path to choose its source directory. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions action-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ inputs:
type: string
gpg-private-key-passphrase:
type: string
git-repo-path:
type: string
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ inputs:
gpg-private-key-passphrase:
description: 'The passphrase for the private key, if any'
required: false
git-repo-path:
description: 'The path to the .gitsecret directory (excluding the .gitsecret part). This is the repository root path by default.'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.gpg-private-key }}
- ${{ inputs.gpg-private-key-passphrase }}
- ${{ inputs.git-repo-path }}
10 changes: 8 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/sh

cd /github/workspace
git config --global --add safe.directory /github/workspace
if [ ! -z "$3" ]; then
export GIT_REPO_PATH="/github/workspace/$3"
else
export GIT_REPO_PATH="/github/workspace"
fi

cd $GIT_REPO_PATH
git config --global --add safe.directory $GIT_REPO_PATH
export GPG_TTY=$(tty)

echo "Revealing the secrets in the repository..."
Expand Down
0