Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Use in GitHub action #27

Open
aymanapatel opened this issue Dec 29, 2020 · 3 comments
Open

Use in GitHub action #27

aymanapatel opened this issue Dec 29, 2020 · 3 comments

Comments

@aymanapatel
Copy link

Is it possible to use this repository in a Github Action? If so, is there documentation for the same?

@gaurav-nelson
Copy link
Owner

It's really easy to create GitHub actions, go through https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-docker-container-action

For a reference see https://github.com/gaurav-nelson/github-action-markdown-link-check
You can then intelligently replace markdown-link-check with asciidoc-link-check.

I don't find enough time to maintain another action, however, I can help you if you get stuck or need clarifications.

@jmbruel
Copy link

jmbruel commented Feb 10, 2021

Here is my action file (.github/workflows/action.yml):

name: Checks

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  markdown-link-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: gaurav-nelson/github-action-markdown-link-check@v1
      with:
        config-file: 'config.json'

  asciidoc-link-check:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [15.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm install -g asciidoc-link-check
    - run: find . -name \*.adoc -exec asciidoc-link-check -c config.json {} \;

@gaurav-nelson
Copy link
Owner

Thanks @jmbruel for chiming in. @aymanapatel you create a config.json file and use this action.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants