Skip to content

switch from snyk/actions/python to snyk/actions/setup #498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,34 @@ jobs:
with:
fetch-depth: 0

- name: Run Snyk (setup.py)
uses: snyk/actions/python@master
# - name: Run Snyk (setup.py)
# uses: snyk/actions/python@master
# with:
# command: monitor
# args: --file=setup.py --package-manager=pip --project-name=setup.py --org=${{ env.SNYK_ORG }}

# - name: Run Snyk (requirements.txt)
# uses: snyk/actions/python@master
# with:
# command: monitor
# args: --file=requirements.txt --package-manager=pip --project-name=requirements.txt --org=${{ env.SNYK_ORG }}

# On Oct 2 2023, the steps using snyk/actions/python@master started failing with "undefined".
# Nothing obvious changed in our code or in the Snyk action or Docker image.
# Setting up and running snyk generically seems to work, so we'll go with that.
- name: Set up Python
uses: actions/setup-python@v4
with:
command: monitor
args: --file=setup.py --package-manager=pip --project-name=setup.py --org=${{ env.SNYK_ORG }}
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: snyk/actions/setup@master

- name: Run Snyk (setup.py)
run: snyk monitor --file="setup.py" --package-manager=pip --project-name="setup.py" --org=${{ env.SNYK_ORG }}

- name: Run Snyk (requirements.txt)
uses: snyk/actions/python@master
with:
command: monitor
args: --file=requirements.txt --package-manager=pip --project-name=requirements.txt --org=${{ env.SNYK_ORG }}
run: snyk monitor --file="requirements.txt" --package-manager=pip --project-name="requirements.txt" --org=${{ env.SNYK_ORG }}