Skip to content

Add snap instructions for Linux #9874

Add snap instructions for Linux

Add snap instructions for Linux #9874

name: MSDocs build verifier - tryfix
on:
issue_comment:
types: [created]
jobs:
tryfix:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/tryfix')
name: Try fix build
runs-on: ubuntu-latest
permissions: write-all
env:
IS_TRY_FIX: true # differentiates /tryfix from the validation-only run.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
id: get-pr
with:
script: |
const request = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
}
core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`)
try {
const result = await github.pulls.get(request)
return result.data
} catch (err) {
core.setFailed(`Request failed with error ${err}`)
}
- name: Checkout the repository
uses: actions/checkout@v4.1.5
- name: Checkout Pull Request
run: |
hub pr checkout ${{ github.event.issue.number }}
- name: Tryfix
uses: dotnet/docs-actions/actions/docs-verifier@main
- name: Push changes
run: |
git config --global user.name github-actions
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add fork https://github.com/${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }}
git commit -am "Automated: Fix links"
git push -u fork ${{ fromJSON(steps.get-pr.outputs.result).head.ref }}