Workflow file for this run
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: copy-documentation-readme-upwards | |
on: | |
push: | |
branches: | |
- main | |
- dev/upm-readiness | |
jobs: | |
copy-documentation-readme-upwards: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: copy documentation readme upwards | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
$readmeDir = Get-Item -Path "**/Packages/com.*/Documentation~" | Select-Object -ExpandProperty FullName | |
$readmeDir = $readmeDir.replace('${{ github.workspace }}/','') | |
echo $readmeDir | |
$readmeContent = gc (Get-Item -Path "**/Packages/com.*/Documentation~/README.md") -Raw | |
$readmeContent = $readmeContent -replace '(\[.*\])\(((?!https?:\/\/).+)\)',('$1('+$readmeDir+'$2)') | |
echo (gc README.md -Raw) | |
# Set-Content ./README.md $readme | |
# git add ./README.md | |
# git commit -m 'Copied repo README from package README' | |
working-directory: ${{ github.workspace }} | |
shell: pwsh |