mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 13:16:52 +03:00
43b185e1c1
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
name: Test Valgrind
|
|
|
|
# like the docker tests, but running valgrind only on *.c/*.h changes.
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**.c"
|
|
- "**.h"
|
|
pull_request:
|
|
paths:
|
|
- "**.c"
|
|
- "**.h"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
docker: [
|
|
ubuntu-20.04-focal-amd64-valgrind,
|
|
]
|
|
dockerTag: [main]
|
|
|
|
name: ${{ matrix.docker }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build system information
|
|
run: python3 .github/workflows/system-info.py
|
|
|
|
- name: Docker pull
|
|
run: |
|
|
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
|
|
|
- name: Build and Run Valgrind
|
|
run: |
|
|
# The Pillow user in the docker container is UID 1000
|
|
sudo chown -R 1000 $GITHUB_WORKSPACE
|
|
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
|
sudo chown -R runner $GITHUB_WORKSPACE
|