mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 16:16:09 -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'
|
source-directory: 'output'
|
||||||
destination-github-username: 'cpina'
|
destination-github-username: 'cpina'
|
||||||
destination-repository-name: 'pandoc-test-output'
|
destination-repository-name: 'pandoc-test-output'
|
||||||
git-user-email: carles@pina.cat
|
user-email: carles3@pina.cat
|
||||||
```
|
```
|
||||||
|
|
||||||
Working example:
|
Working example:
|
||||||
|
|
|
@ -20,7 +20,7 @@ runs:
|
||||||
- ${{ inputs.source-directory }}
|
- ${{ inputs.source-directory }}
|
||||||
- ${{ inputs.destination-github-username }}
|
- ${{ inputs.destination-github-username }}
|
||||||
- ${{ inputs.destination-repository-name }}
|
- ${{ inputs.destination-repository-name }}
|
||||||
- ${{ inputs.git-user-email }}
|
- ${{ inputs.user-email }}
|
||||||
branding:
|
branding:
|
||||||
icon: 'git-commit'
|
icon: 'git-commit'
|
||||||
color: 'green'
|
color: 'green'
|
||||||
|
|
|
@ -4,12 +4,12 @@ echo "Starts"
|
||||||
FOLDER="$1"
|
FOLDER="$1"
|
||||||
GITHUB_USERNAME="$2"
|
GITHUB_USERNAME="$2"
|
||||||
GITHUB_REPO="$3"
|
GITHUB_REPO="$3"
|
||||||
GIT_USER_EMAIL="$4"
|
USER_EMAIL="$4"
|
||||||
|
|
||||||
CLONE_DIR=$(mktemp -d)
|
CLONE_DIR=$(mktemp -d)
|
||||||
|
|
||||||
# Setup git
|
# 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 config --global user.name "$GITHUB_USERNAME"
|
||||||
git clone "https://$API_TOKEN_GITHUB@github.com/$GITHUB_USERNAME/$GITHUB_REPO.git" "$CLONE_DIR"
|
git clone "https://$API_TOKEN_GITHUB@github.com/$GITHUB_USERNAME/$GITHUB_REPO.git" "$CLONE_DIR"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user