github-action-markdown-link-check icon indicating copy to clipboard operation
github-action-markdown-link-check copied to clipboard

Feature request set base url option in github action

Open kouliavtsev opened this issue 3 years ago • 1 comments
trafficstars

In my case, PREVIEW_URL changes on newly opened PR. It would be great to be able to pass the BASEURL from the github action into the github file like this.

on: [pull_request]
name: Check links for modified files
jobs:
  markdown-link-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: gaurav-nelson/github-action-markdown-link-check@v1
      with:
        base-url: ${{ secret.PREVIEW_URL }}

This way, it could be used like this in markdown-links-config.json

{
  "replacementPatterns": [    
    {
      "pattern": "^/",
      "replacement": "{{BASEURL}}/"
    }
  ]
}

kouliavtsev avatar Nov 02 '22 08:11 kouliavtsev

I have stopped working on this action. Please try https://github.com/UmbrellaDocs/linkspector and https://github.com/UmbrellaDocs/action-linkspector instead. Linkspector supports base-url.

gaurav-nelson avatar May 14 '24 12:05 gaurav-nelson