Skip to content

Commit

Permalink
fix: Add unsafe directory fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Sage committed May 23, 2022
1 parent 378d8fd commit b22ee49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v1.0.3
with:
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Sync up to CodeCommit
uses: youyo/sync-up-to-codecommit-action@v1
uses: tsgit18/sync-up-to-codecommit-action@v1
with:
repository_name: test_repo
aws_region: us-east-1
Expand All @@ -47,6 +47,3 @@ jobs:

[MIT](LICENSE)

## Author

[youyo](https://github.com/youyo)
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Sync up to AWS CodeCommit Action
description: 'Synchronize from GitHub to CodeCommit via GitHub Actions. No need to ssh-private-key. Need to AWS IAM Credentials only.'
description: 'Synchronize from GitHub to CodeCommit via GitHub Actions using IAM credentials.'
author: 'youyo <1003ni@gmail.com>'
branding:
icon: terminal
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RepositoryName="${INPUT_REPOSITORY_NAME}"
AwsRegion="${INPUT_AWS_REGION}"
CodeCommitUrl="https://git-codecommit.${AwsRegion}.amazonaws.com/v1/repos/${RepositoryName}"

git config --global --add safe.directory /github/workspace
git config --global credential.'https://git-codecommit.*.amazonaws.com'.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
git remote add sync ${CodeCommitUrl}
Expand Down

0 comments on commit b22ee49

Please sign in to comment.