-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update workflow instructions to yml
- Loading branch information
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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`. | ||
|
||
|