diff --git a/README.md b/README.md index e101b81..e7974b0 100644 --- a/README.md +++ b/README.md @@ -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:access_token@github.com/username/repository.git`.