Merge pull request #104 from KomodoPlatform/file-author-data-lint #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Get file and author data, validate and update internal links | |
on: | |
push: | |
branches: ["dev"] | |
pull_request: | |
jobs: | |
pre_job: | |
# continue-on-error: true # Uncomment once integration is finished | |
runs-on: ubuntu-latest | |
# Map a step output to a job output | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
# All of these options are optional, so you can remove them if you are happy with the defaults | |
concurrent_skipping: "never" | |
skip_after_successful_duplicate: "true" | |
do_not_skip: '["pull_request"]' | |
update_lint_get_data: | |
needs: pre_job | |
if: needs.pre_job.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: npm- | |
- name: Install dependencies | |
shell: bash | |
run: cd utils/js && npm ci | |
- name: Get file and Author data | |
run: node utils/js/get_file_author_data.js | |
- name: Validate and Update links | |
run: node utils/js/validate_update_internal_links.js | |
- name: Check presence of file and dirs | |
run: node utils/js/file_presence_structure_checker.js | |
- name: Verify h1 is present in every file | |
run: node utils/js/h1_presence_checker.js | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "[Bot] On merge to dev, File and author data updated, validated and updated internal links, formatted md content, checked presence of file and dirs based on sidebar, checked presence of h1 in every file" | |
committer: GitHub <noreply@github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
branch: file-author-data-lint | |
delete-branch: true | |
title: "[BOT] Lints file structure, file contents, gets author data" | |
body: | | |
- On merge to dev, File and author data updated, validated and updated internal links, formatted md content, checked presence of file and dirs based on sidebar, checked presence of h1 in every file | |
labels: | | |
autogenerated | |
reviewers: smk762, gcharang | |
draft: false |