File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Markdown Update
22on :
3+ workflow_dispatch :
34 push :
45 paths :
56 - ' docs/**'
@@ -24,19 +25,15 @@ defaults:
2425
2526jobs :
2627 docs :
27- permissions :
28- contents : write
2928 name : Update Markdown (embedded snippets)
3029 runs-on : ubuntu-24.04
3130 steps :
3231 -
3332 name : Checkout
34- uses : actions/checkout@v6
35- if : github.event_name == 'push'
36- -
37- name : Checkout
38- uses : actions/checkout@v6
39- if : github.event_name == 'pull_request'
33+ uses : gittools/cicd/checkout@v1
34+ with :
35+ op_service_account_token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
36+ fetch-depth : 1
4037 -
4138 name : Setup .NET SDK
4239 uses : actions/setup-dotnet@v5
4845 dotnet tool install --global MarkdownSnippets.Tool
4946 mdsnippets --write-header false
5047 working-directory : ${{ github.workspace }}/docs/input
48+
5149 -
52- name : Check for changes
53- id : status
54- run : |
55- if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
56- -
57- name : Push changes
58- run : |
59- git add --verbose .
60- git config user.name 'gittools-bot'
61- git config user.email 'gittoolsbot@outlook.com'
62- git commit -m 'Docs changes' --allow-empty
63- git push --force
64- if : steps.status.outputs.has_changes == '1' && github.event_name == 'push'
50+ name : Commit and push markdown docs changes
51+ uses : gittools/cicd/git-commit-push@v1
52+ with :
53+ message : " include markdown docs changes"
Original file line number Diff line number Diff line change @@ -18,22 +18,15 @@ jobs:
1818 steps :
1919 -
2020 name : Checkout
21- uses : actions/checkout@v6
22- if : github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
21+ uses : gittools/cicd/checkout@v1
22+ with :
23+ op_service_account_token : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
24+ fetch-depth : 0
2325 -
2426 name : Mark public API as shipped
2527 run : ./src/mark-shipped.ps1
2628 -
27- name : Check for changes
28- id : status
29- run : |
30- if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
31- -
32- name : Push changes
33- run : |
34- git add --verbose .
35- git config user.name 'gittools-bot'
36- git config user.email 'gittoolsbot@outlook.com'
37- git commit -m 'Mark public API as shipped' --allow-empty
38- git push --force
39- if : steps.status.outputs.has_changes == '1'
29+ name : Commit and push changes
30+ uses : gittools/cicd/git-commit-push@v1
31+ with :
32+ message : " include public API changes"
You can’t perform that action at this time.
0 commit comments