8 # Run Coverity daily at midnight
14 if: github.repository == 'systemd/systemd'
16 COVERITY_SCAN_BRANCH_PATTERN: "${{ github.ref}}"
17 COVERITY_SCAN_NOTIFICATION_EMAIL: ""
18 COVERITY_SCAN_PROJECT_NAME: "${{ github.repository }}"
19 # Set in repo settings -> secrets -> repository secrets
20 COVERITY_SCAN_TOKEN: "${{ secrets.COVERITY_SCAN_TOKEN }}"
21 CURRENT_REF: "${{ github.ref }}"
23 - name: Repository checkout
24 uses: actions/checkout@v1
25 # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
26 - name: Set the $COVERITY_SCAN_NOTIFICATION_EMAIL env variable
27 run: echo "COVERITY_SCAN_NOTIFICATION_EMAIL=$(git log -1 ${{ github.sha }} --pretty=\"%aE\")" >> $GITHUB_ENV
28 - name: Install Coverity tools
29 run: tools/get-coverity.sh
30 # Reuse the setup phase of the unit test script to avoid code duplication
31 - name: Install build dependencies
32 run: sudo -E .github/workflows/ubuntu-unit-tests.sh SETUP
33 # Preconfigure with meson to prevent Coverity from capturing meson metadata
34 - name: Preconfigure the build directory
35 run: meson cov-build -Dman=false
37 run: tools/coverity.sh build
38 - name: Upload the results
39 run: tools/coverity.sh upload