Skip to content

Commit

Permalink
Fix typo-check in CI, run only for pull requests because of security …
Browse files Browse the repository at this point in the history
…reasons (#4433)
  • Loading branch information
lhotari authored Jun 12, 2024
1 parent 88bcdc9 commit ac2f8a2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/bk-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,14 @@ jobs:

typo-check:
name: Typo Check
# only run on pull requests because of security reasons
# we shouldn't trust external actions for builds within the repository
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check typos
uses: crate-ci/typos@master
uses: crate-ci/typos@v1.22.4

owasp-dependency-check:
name: OWASP Dependency Check
Expand Down Expand Up @@ -551,11 +554,19 @@ jobs:
'windows-build'
]
steps:
- name: Check build-and-license-check and typo-check success
- name: Check build-and-license-check success
run: |
if [[ ! ( \
"${{ needs.build-and-license-check.result }}" == "success" \
&& "${{ needs.typo-check.result }}" == "success" \
) ]]; then
echo "Required jobs haven't been completed successfully."
exit 1
fi
- name: Check typo-check success for pull requests
if: ${{ github.event_name == 'pull_request' }}
run: |
if [[ ! ( \
"${{ needs.typo-check.result }}" == "success" \
) ]]; then
echo "Required jobs haven't been completed successfully."
exit 1
Expand Down

0 comments on commit ac2f8a2

Please sign in to comment.