Skip to content

Commit

Permalink
docs: update workflow instructions to yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wei authored Aug 9, 2019
1 parent eb8e14e commit 41c4a46
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@ A GitHub Action for syncing between two independent repositories using **force p

### Github Actions
```
action "repo-sync" {
uses = "wei/git-sync@master"
args = "$SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH"
env = {
SOURCE_REPO = ""
SOURCE_BRANCH = ""
DESTINATION_REPO = ""
DESTINATION_BRANCH = ""
}
secrets = ["SSH_PRIVATE_KEY"]
}
# File: .github/workflows/repo-sync.yml
on: push
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- name: repo-sync
uses: wei/git-sync@master
env:
SOURCE_REPO: ""
SOURCE_BRANCH: ""
DESTINATION_REPO: ""
DESTINATION_BRANCH: ""
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
args: $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH
```
`SSH_PRIVATE_KEY` can be omitted if using authenticated HTTPS repo clone urls like `https://username:[email protected]/username/repository.git`.

Expand Down

0 comments on commit 41c4a46

Please sign in to comment.