Browse Source
* Introduced `action-prettier.yml` for code formatting using Prettier. * Added `action-super-linter.yml` for linting code with Super Linter. * Both workflows trigger on push events to any branch.repo-sync/main
2 changed files with 78 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||
name: Prettier |
|||
on: |
|||
push: |
|||
branches: |
|||
- "*" |
|||
|
|||
concurrency: |
|||
group: prettier-${{ github.ref }} |
|||
cancel-in-progress: true |
|||
|
|||
permissions: |
|||
contents: write |
|||
|
|||
jobs: |
|||
prettier: |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- name: Checkout |
|||
uses: actions/checkout@v5 |
|||
|
|||
- name: Install Prettier and plugins |
|||
run: | |
|||
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template |
|||
|
|||
- name: Prettify code |
|||
uses: creyD/prettier_action@v4.6 |
|||
with: |
|||
prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template" |
|||
prettier_options: --write . |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
@ -0,0 +1,47 @@ |
|||
--- |
|||
name: Super Linter |
|||
|
|||
on: |
|||
push: |
|||
branches: |
|||
- "*" |
|||
|
|||
concurrency: |
|||
group: super-linter-${{ github.ref }} |
|||
cancel-in-progress: true |
|||
|
|||
permissions: {} |
|||
|
|||
jobs: |
|||
build: |
|||
name: Lint |
|||
runs-on: ubuntu-latest |
|||
|
|||
permissions: |
|||
contents: read |
|||
packages: read |
|||
# To report GitHub Actions status checks |
|||
statuses: write |
|||
|
|||
steps: |
|||
- name: Checkout code |
|||
uses: actions/checkout@v5 |
|||
with: |
|||
# super-linter needs the full git history to get the |
|||
# list of files that changed across commits |
|||
fetch-depth: 0 |
|||
|
|||
- name: Install Prettier plugins (for summary formatting) |
|||
run: | |
|||
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true |
|||
|
|||
- name: Super-linter |
|||
uses: super-linter/super-linter@v8 |
|||
env: |
|||
# To report GitHub Actions status checks |
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|||
VALIDATE_JSCPD: false |
|||
VALIDATE_SHELL_SHFMT: false |
|||
VALIDATE_YAML_PRETTIER: false |
|||
VALIDATE_JSON_PRETTIER: false |
|||
VALIDATE_MARKDOWN_PRETTIER: false |
Loading…
Reference in new issue