-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.15 KB
/
secretlint-diff.yml
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
# Use https://github.com/secretlint/secretlint/pkgs/container/secretlint
---
name: secretlint-diff
on:
push:
jobs:
secretlint:
permissions:
contents: 'read'
runs-on: ubuntu-latest
container:
image: ghcr.io/secretlint/secretlint:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
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@v44
- name: setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
- name: Show changed files
run: echo "${{ steps.changed-files.outputs.all_changed_files }}"
- name: Run secretlint
if: steps.changed-files.outputs.any_changed == 'true'
run: secretlint --config ./secretlintrc.json ${{ steps.changed-files.outputs.all_changed_files }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true