-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI: add test-diff actions * docs: add diff actions docs * CI: nit * add ignore * docs: update REAMDE * docs: update REAMDE
- Loading branch information
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: test-diff | ||
on: | ||
push: | ||
pull_request: | ||
permissions: | ||
contents: read | ||
jobs: | ||
test-diff: | ||
name: "Run secretlint to diff files" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: setup Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Get changed files | ||
id: changed-files-yaml | ||
uses: tj-actions/changed-files@v41 | ||
- name: Install | ||
run: yarn install | ||
- name: Build | ||
run: yarn run build | ||
- name: Run secretlint | ||
run: yarn secretlint "${{ steps.changed-files-yaml.outputs.added_files }}" | ||
env: | ||
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }} | ||
- name: "How to Fix?" | ||
if: failure() | ||
run: | | ||
echo '# Sectlint found credentials' >> $GITHUB_STEP_SUMMARY | ||
echo 'Please check secretlint result and fix it' >> $GITHUB_STEP_SUMMARY | ||
echo 'if you need to ignore the result, please use .secretlintignore file' >> $GITHUB_STEP_SUMMARY | ||
echo 'Please see <https://github.com/secretlint/secretlint/blob/master/docs/configuration.md#ignoring-files> for more details' >> $GITHUB_STEP_SUMMARY |
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
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