forked from Talus-Network/nexus-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.7 KB
/
markdown_format.yml
File metadata and controls
60 lines (51 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Lint and Format Markdown
on:
pull_request:
permissions:
contents: write
jobs:
detect-changes:
uses: ./.github/workflows/detect_changes.yml
with:
files: |
**/*.md
lint-format:
runs-on: ubuntu-latest
needs: detect-changes
if: github.event.pull_request.head.repo.full_name == github.repository && needs.detect-changes.outputs.changed == 'true'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DavidAnson/markdownlint-cli2-action@v20
with:
globs: ${{ needs.detect-changes.outputs.all_changed_files }}
config: .markdownlint.json
fix: true
- name: "Import GPG key"
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.DEVOPS_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.DEVOPS_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- name: "Commit and push changes"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: "Talus DevOps"
commit_user_email: ${{ steps.import-gpg.outputs.email }}
commit_message: "style: format markdown files"
typos-check:
needs: [lint-format, detect-changes]
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository && needs.detect-changes.outputs.changed == 'true'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for typos
uses: crate-ci/typos@v1.32.0
with:
files: ${{ needs.detect-changes.outputs.all_changed_files }}