Skip to content

Commit

Permalink
Use sailbot workspace md config files
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-5546 committed Dec 5, 2023
1 parent 527ef9e commit 129604f
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions .github/workflows/test_definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,67 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 1
if: ${{ inputs.markdown-ci }}
needs: [extract-metadata]
steps:
- name: Check out code
- name: Checkout workspace
uses: actions/checkout@v4
with:
repository: UBCSailbot/${{ inputs.repository }}
repository: UBCSailbot/sailbot_workspace
ref: ${{ needs.extract-metadata.outputs.caller-ref }}

- name: Run linter
- name: Checkout repositories
uses: ./.github/actions/checkout/
with:
repository: ${{ inputs.repository }}

- name: Run linter in workspace
uses: nosborn/github-action-markdown-cli@v3.3.0
if: inputs.repository == 'sailbot_workspace'
with:
config_file: .markdownlint.json
files: .
dot: true

- name: Run linter not in workspace
uses: nosborn/github-action-markdown-cli@v3.3.0
if: inputs.repository != 'sailbot_workspace'
with:
config_file: .markdownlint.json
files: src/${{ inputs.repository }}
dot: true

# https://github.com/gaurav-nelson/github-action-markdown-link-check
markdown-link-check:
runs-on: ubuntu-latest
timeout-minutes: 1
if: ${{ inputs.markdown-ci }}
needs: [extract-metadata]
steps:
- name: Check out code
- name: Checkout workspace
uses: actions/checkout@v4
with:
repository: UBCSailbot/${{ inputs.repository }}
repository: UBCSailbot/sailbot_workspace
ref: ${{ needs.extract-metadata.outputs.caller-ref }}

- name: Run linter
- name: Checkout repositories
uses: ./.github/actions/checkout/
with:
repository: ${{ inputs.repository }}

- name: Run linter in workspace
uses: gaurav-nelson/github-action-markdown-link-check@v1
if: inputs.repository == 'sailbot_workspace'
with:
config-file: .markdown-link-check.json
folder-path: .

- name: Run linter not in workspace
uses: gaurav-nelson/github-action-markdown-link-check@v1
if: inputs.repository != 'sailbot_workspace'
with:
config-file: .markdown-link-check.json
folder-path: src/${{ inputs.repository }}

# Rebuilds our docs site https://ubcsailbot.github.io/docs/
rebuild-docs:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 129604f

Please sign in to comment.