Skip to content

Commit

Permalink
Merge pull request #8 from firstdollar/master
Browse files Browse the repository at this point in the history
Add support for running git-crypt in a path other than GITHUB_WORKSPACE
  • Loading branch information
ArnaudRinquin authored Jan 19, 2024
2 parents a9cbaf8 + a81289e commit f99c0c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
git-crypt export-key ./tmp-key && cat ./tmp-key | base64 | pbcopy && rm ./tmp-key
```

### Run Directory

You can run the git-crypt unlock command from a different directory besides GITHUB_WORKSPACE by setting a RUN_DIR env var.

### Running tests

```shell script
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -eu

if [ -n "${RUN_DIR:-}" ]; then
cd ${RUN_DIR}
echo "Running git-crypt command from ${RUN_DIR}"
fi

echo "$GIT_CRYPT_KEY" | base64 -d > ./git-crypt-key

git-crypt unlock ./git-crypt-key
Expand Down

0 comments on commit f99c0c6

Please sign in to comment.