mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 08:06:10 -07:00
parent
811756fa00
commit
637125d225
|
@ -47,7 +47,7 @@ Then make the token available to the Github Action following the steps:
|
|||
source-directory: 'output'
|
||||
destination-github-username: 'cpina'
|
||||
destination-repository-name: 'pandoc-test-output'
|
||||
git-user-email: carles@pina.cat
|
||||
user-email: carles3@pina.cat
|
||||
```
|
||||
|
||||
Working example:
|
||||
|
|
|
@ -20,7 +20,7 @@ runs:
|
|||
- ${{ inputs.source-directory }}
|
||||
- ${{ inputs.destination-github-username }}
|
||||
- ${{ inputs.destination-repository-name }}
|
||||
- ${{ inputs.git-user-email }}
|
||||
- ${{ inputs.user-email }}
|
||||
branding:
|
||||
icon: 'git-commit'
|
||||
color: 'green'
|
||||
|
|
|
@ -4,12 +4,12 @@ echo "Starts"
|
|||
FOLDER="$1"
|
||||
GITHUB_USERNAME="$2"
|
||||
GITHUB_REPO="$3"
|
||||
GIT_USER_EMAIL="$4"
|
||||
USER_EMAIL="$4"
|
||||
|
||||
CLONE_DIR=$(mktemp -d)
|
||||
|
||||
# Setup git
|
||||
git config --global user.email "$GIT_USER_EMAIL"
|
||||
git config --global user.email "$USER_EMAIL"
|
||||
git config --global user.name "$GITHUB_USERNAME"
|
||||
git clone "https://$API_TOKEN_GITHUB@github.com/$GITHUB_USERNAME/$GITHUB_REPO.git" "$CLONE_DIR"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user