Skip to content

[StepSecurity] Apply Pre-commit for security best practices (#362) #851

[StepSecurity] Apply Pre-commit for security best practices (#362)

[StepSecurity] Apply Pre-commit for security best practices (#362) #851

# This file fixes the issue "Handling skipped but required checks".
# Now we can protect the main branch with gtest checks required.
# More info refer to https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: gtest
on:
push:
paths-ignore:
- 'include/**'
- 'lib/**'
- 'patches/dpdk/**'
- 'tests/**'
- build.sh
- kahawai.json
- meson.build
- meson_options.txt
- VERSION
- .github/workflows/ubuntu_build_with_gtest.yml
pull_request:
paths-ignore:
- 'include/**'
- 'lib/**'
- 'patches/dpdk/**'
- 'tests/**'
- build.sh
- kahawai.json
- meson.build
- meson_options.txt
- VERSION
- .github/workflows/ubuntu_build_with_gtest.yml
permissions:
contents: read
jobs:
Build:
if: github.repository == 'OpenVisualCloud/Media-Transport-Library'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Harden Runner
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
with:
egress-policy: audit
- run: 'echo "No gtest build required"'
Test:
if: github.repository == 'OpenVisualCloud/Media-Transport-Library'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
with:
egress-policy: audit
- run: 'echo "No gtest test required"'