File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ inputs:
2020 artifact-name :
2121 description : ' Name of the artifact to download before pushing changes.'
2222 required : false
23+ force-checkout :
24+ description : ' Force checkout the target branch, discarding local changes.'
25+ required : false
2326
2427runs :
2528 using : " composite"
4750 - name : Check for changes in ${{ inputs.working-directory }}
4851 shell : bash
4952 run : |
50- git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }} -- force
53+ git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }} ${{ inputs.force-checkout && '-- force' || '' }}
5154 git stash apply
5255 git diff --staged --quiet -- ${{ inputs.working-directory }}
5356 continue-on-error : true
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ jobs:
223223 working-directory : ' ./api-reference/'
224224 target-branch : ${{ github.head_ref || github.ref }}
225225 commit-message : ' Update docs for version ${{ env.friendly-version }}'
226+ force : false
226227 - name : ' Generate assembly metadata'
227228 uses : ./.github/actions/docfx-build
228229 with :
You can’t perform that action at this time.
0 commit comments