Snyk Repository Import and Cleanup #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Snyk Repository Import and Cleanup | |
on: | |
schedule: | |
- cron: '0 11 * * *' # 11 AM UTC every day | |
workflow_dispatch: | |
jobs: | |
import_repositories: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests python-dotenv | |
- name: Run Snyk import script | |
env: | |
GIT_API_KEY: ${{ secrets.GIT_API_KEY }} | |
SNYK_API_KEY: ${{ secrets.SNYK_API_KEY }} | |
run: python snyk-custom-property-scripts/snyk-import.py | |
- name: Remove Archived Repositories from Snyk | |
env: | |
GIT_API_KEY: ${{ secrets.GIT_API_KEY }} | |
SNYK_API_KEY: ${{ secrets.SNYK_API_KEY }} | |
run: python snyk-custom-property-scripts/remove_archived_repos_snyk.py |