Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Mar 17, 2024
1 parent 2c800cb commit fb9589c
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/github_action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: GitHub Action

on:
workflow_dispatch:
push:
branches:
- '*'
- main
- release_*
pull_request:
types:
- opened
Expand All @@ -15,6 +17,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: AlexanderDokuchaev/[email protected]
- uses: ./
with:
config: pyproject.toml
4 changes: 3 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: MacOS

on:
workflow_dispatch:
push:
branches:
- '*'
- main
- release_*
pull_request:
types:
- opened
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Linter

on:
workflow_dispatch:
push:
branches:
- '*'
- main
- release_*
pull_request:
types:
- opened
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Ubuntu

on:
workflow_dispatch:
push:
branches:
- '*'
- main
- release_*
pull_request:
types:
- opened
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Windows

on:
workflow_dispatch:
push:
branches:
- '*'
- main
- release_*
pull_request:
types:
- opened
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Example of output for [fail.md](tests/test_md_files/fail.md)
```bash
File: tests/test_md_files/fail.md:3 • Link: https://github.com/AlexanderDokuchaev/FAILED • Error: 404: Not Found
File: tests/test_md_files/fail.md:4 • Link: https://not_exist_github.githubcom/ • Error: 500: Internal Server Error
File: tests/test_md_files/fail.md:8 • Link: /test/fail.md1 • Error: Path does not exists in repository
File: tests/test_md_files/fail.md:9 • Link: fail.md1 • Error: Path does not exists in repository
File: tests/test_md_files/fail.md:8 • Link: /test/fail.md1 • Error: Path does not exist in repository
File: tests/test_md_files/fail.md:9 • Link: fail.md1 • Error: Path does not exist in repository
File: tests/test_md_files/fail.md:13 • Link: /tests/test_md_files/fail.md#fail • Error: Not found fragment
File: tests/test_md_files/fail.md:15 • Link: not_exist_dir • Error: Path does not exists in repository
File: tests/test_md_files/fail.md:15 • Link: not_exist_dir • Error: Path does not exist in repository
❌ Found 6 dead links 🙀
```

Expand Down
20 changes: 18 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ runs:
run: pip install md-dead-link-check==${{ inputs.version }}
shell: bash

- name: Fetch the number's square
run: md-dead-link-check --config=${{ inputs.config }}
- name: (PR) Get all changed markdown files
id: changed-markdown-files
if: github.event_name == 'pull_request'
uses: tj-actions/changed-files@v43
with:
files: |
**.md
- name: (PR) Check links
if: github.event_name == 'pull_request'
env:
CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
run: md-dead-link-check --hook ${CHANGED_FILES}
shell: bash

- name: Check all links
if: github.event_name != 'pull_request'
run: md-dead-link-check
shell: bash
1 change: 1 addition & 0 deletions tests/test_md_files/a.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ Some text
#### Badge

[![GitHub Action](https://github.com/AlexanderDokuchaev/md-dead-link-check/actions/workflows/github_action.yml/badge.svg?branch=main "tag")](https://github.com/AlexanderDokuchaev/md-dead-link-check/actions/workflows/github_action.yml "tag")
test

0 comments on commit fb9589c

Please sign in to comment.