Skip to content

Upgrade trivy scans (#997) #2713

Upgrade trivy scans (#997)

Upgrade trivy scans (#997) #2713

# 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:
branches:
- main
- 'maint-**'
pull_request:
branches:
- main
- 'maint-**'
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.linux_gtest == 'true' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2
id: filter
with:
filters: .github/path_filters.yml
Build:
needs: changes
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- run: 'echo "No gtest build required"'
Test:
needs: changes
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- run: 'echo "No gtest test required"'