зеркало из
1
0
Форкнуть 0
Multi-tenant-Landing-Zones/.github/workflows/Update-Wiki.yml

66 строки
2.5 KiB
YAML

name: Update wiki
on:
push:
branches:
- master
paths:
- src/platform-automation/cmdb/customers/**
defaults:
run:
shell: pwsh
env:
artifactsSrcFolder: ./src/platform-automation/artifacts
lighthouseDeploymentCredential: ${{ secrets.AZURE_LIGHTHOUSE_CREDENTIAL }}
jobs:
test_arm_templates:
runs-on: ubuntu-latest
name: Generate wiki pages for all customers managed by code
steps:
- uses: actions/checkout@v2
with:
path: main
- uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki # specify the wiki repo name here.
path: wiki
- name: Login to Azure with Powershell
run: ./main/src/platform-automation/platform-scripts/Login-WithSecretString.ps1 -secretJson '${{ env.lighthouseDeploymentCredential }}' -verbose
- name: check wiki repo content
run: |
cd wiki
ls -al
- name: Update customers wiki
run: ./main/src/platform-automation/platform-scripts/Build-Wiki.ps1 -customersPath 'main/src/platform-automation/cmdb/customers' -wikiPath 'wiki/'
- name: Commit changes files
run: |
cd wiki
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Updated wiki"
- name: Push changes to wiki repo
uses: ad-m/github-push-action@master
with:
directory: wiki
repository: ${{github.repository}}.wiki # specify the wiki repo and push the update.
github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Updated Governance documentation for customers
# id: cpr
# uses: peter-evans/create-pull-request@v2
# with:
# path: wiki
# token: ${{ secrets.GITHUB_TOKEN }}
# commit-message: Updated customer list
# title: '[Customers] Updated list of customers'
# body: |
# - Auto-generated by [create-pull-request][1]
# labels: report, automated pr
# assignees: haraldfianbakken
# reviewers: haraldfianbakken
# branch-suffix: timestamp
# - name: Check outputs
# run: |
# echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
# echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"