Setup a Github Workflow

You can create a daily report for your project using a Github Workflow following this simple steps:
  • In your repository, create the .github/workflows/ directory to store your workflow files if doesn't exist.
  • In the.github/workflows/directory create a new file called olynpm-metrics.yml and add the following code.
      name: olynpm-audit
      run-name: Scan for vulnerable and outdated packages.
      on:
        schedule:
          - cron: "15 15 * * 0"
      jobs:
        olynpm-track-dependencies:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v4
            - uses: actions/setup-node@v4
              with:
                node-version: "20"
            - env:
                OLYNPM_ACCESS_TOKEN: ${{ secrets.OLYNPM_ACCESS_TOKEN }}
              run: |
                npm install -g olynpm
                olynpm audit
      
  • Commit these changes and push them to your GitHub repository.
  • Create a github action secret with the name "OLYNPM_ACCESS_TOKEN" for your repository using your access token.