Skip to content

NPM Package Retention #10

NPM Package Retention

NPM Package Retention #10

name: NPM Package Retention
on:
schedule:
- cron: "0 0 * * 0" # Run weekly on Sunday at midnight
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install npm
run: |
npm install -g npm@latest
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run retention script
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: python .github/scripts/npm_retention.py