Merge pull request #144 from vmware/IAC-807-improve-js-hinting-plugin… #12
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
name: Sync the Wiki | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "wiki/**" | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- id: get-commit-info | |
run: | | |
echo "::set-output name=author::$(git log -1 --pretty=format:'%an <%ae>')" | |
echo "::set-output name=message::$(git show -s --format=%B)" | |
- run: git clone https://[email protected]/vmware/vrealize-developer-tools.wiki.git /tmp/wiki-repo | |
env: | |
GITHUB_TOKEN: ${{ secrets.WIKI_BOT_GITHUB_TOKEN }} | |
- run: rsync -avzr --delete --exclude=".git/" "./wiki/" "/tmp/wiki-repo" | |
- name: Commit changes to the .wiki.git repository | |
run: | | |
git config user.name "vmware-bot" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "$COMMIT_MESSAGE" --author="$COMMIT_AUTHOR" | |
git push -f origin HEAD:master | |
working-directory: /tmp/wiki-repo | |
env: | |
COMMIT_AUTHOR: ${{ steps.get-commit-info.outputs.author }} | |
COMMIT_MESSAGE: ${{ steps.get-commit-info.outputs.message }} |