Skip to content

secretlint

secretlint #3360

Workflow file for this run

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
name: secretlint
jobs:
secretlint:
permissions:
contents: read
name: "Run secretlint to diff files"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# fetch history to get all changed files on push or pull_request event
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.1
- name: setup Node ${{ matrix.node-version }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
- name: Show changed files
run: echo "${{ steps.changed-files.outputs.all_changed_files }}"
- name: Install
if: steps.changed-files.outputs.any_changed == 'true'
run: pnpm i
- name: Run secretlint
if: steps.changed-files.outputs.any_changed == 'true'
run: npx secretlint ${{ steps.changed-files.outputs.all_changed_files }}