Skip to content

Commit 41c4a46

Browse files
authored
docs: update workflow instructions to yml
1 parent eb8e14e commit 41c4a46

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

README.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,22 @@ A GitHub Action for syncing between two independent repositories using **force p
1414

1515
### Github Actions
1616
```
17-
action "repo-sync" {
18-
uses = "wei/git-sync@master"
19-
args = "$SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH"
20-
env = {
21-
SOURCE_REPO = ""
22-
SOURCE_BRANCH = ""
23-
DESTINATION_REPO = ""
24-
DESTINATION_BRANCH = ""
25-
}
26-
secrets = ["SSH_PRIVATE_KEY"]
27-
}
17+
# File: .github/workflows/repo-sync.yml
18+
19+
on: push
20+
jobs:
21+
repo-sync:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: repo-sync
25+
uses: wei/git-sync@master
26+
env:
27+
SOURCE_REPO: ""
28+
SOURCE_BRANCH: ""
29+
DESTINATION_REPO: ""
30+
DESTINATION_BRANCH: ""
31+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
32+
args: $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH
2833
```
2934
`SSH_PRIVATE_KEY` can be omitted if using authenticated HTTPS repo clone urls like `https://username:[email protected]/username/repository.git`.
3035

0 commit comments

Comments
 (0)