-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into flkelly-powershell-greenfield
- Loading branch information
Showing
311 changed files
with
15,692 additions
and
3,291 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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: Docs/Wiki Sync | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/wiki/**" | ||
workflow_dispatch: {} | ||
|
||
env: | ||
wiki_source_repo: "${{ github.repository }}" | ||
wiki_source_repo_dir: "${{ github.repository }}/docs/wiki" | ||
wiki_target_repo: "${{ github.repository }}.wiki" | ||
github_user_name: "github-actions" | ||
github_email: "41898282+github-actions[bot]@users.noreply.github.com" | ||
github_commit_message: "GitHub Action syncing wiki from docs/wiki" | ||
|
||
jobs: | ||
sync-wiki: | ||
name: Sync docs/wiki to Wiki | ||
if: github.repository == 'Azure/Enterprise-Scale' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ env.wiki_source_repo }} | ||
path: ${{ env.wiki_source_repo }} | ||
|
||
- name: Checkout Wiki Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ env.wiki_target_repo }} | ||
path: ${{ env.wiki_target_repo }} | ||
|
||
- name: Configure Local Git | ||
run: | | ||
git config --global user.name $github_user_name | ||
git config --global user.email $github_email | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
|
||
- name: Sync docs/wiki Into Wiki Repo | ||
run: | | ||
rsync -avzr --delete --exclude='.git/' "$wiki_source_repo_dir/" "$wiki_target_repo" | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
|
||
- name: Check for changes | ||
id: git_status | ||
run: | | ||
mapfile -t CHECK_GIT_STATUS < <(git status -s) | ||
printf "%s\n" "${CHECK_GIT_STATUS[@]}" | ||
echo "changes=${#CHECK_GIT_STATUS[@]}" >> $GITHUB_OUTPUT | ||
working-directory: ${{ env.wiki_target_repo }} | ||
|
||
- name: Add files, commit and push into Wiki | ||
if: steps.git_status.outputs.changes > 0 | ||
run: | | ||
echo "Pushing changes to origin..." | ||
git add . | ||
git commit -m "$github_commit_message [$GITHUB_ACTOR/${GITHUB_SHA::8}]" | ||
git push --set-upstream "https://[email protected]/$wiki_target_repo.git" master | ||
working-directory: ${{ env.wiki_target_repo }} |
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
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
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
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
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
Oops, something went wrong.