updated dynamic schema resources #1
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: build-readme | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.yml' | |
- '!.github/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "6.0" | |
- name: Render Readme | |
run: dotnet run --project ./ALG/ALG.csproj | |
- name: Check for modified files | |
id: git-check | |
run: echo "modified=$(if [[ $(git diff --name-only HEAD --) == "README.md" ]]; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT | |
- name: Commit files | |
if: steps.git-check.outputs.modified == 'true' | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git add ./README.md && git commit -m "Update README" | |
- name: Push changes | |
if: steps.git-check.outputs.modified == 'true' | |
run: git push |