name: npm-audit-ci

on:
  push:
  pull_request:
  schedule:
    - cron:  '0 0 * * *'

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

permissions: 
  actions: read
  packages: read
  contents: read

jobs:
  npm-audit-ci:
    name: npm-audit-ci
    runs-on: ubuntu-latest
    container:
      image: quay.io/389ds/ci-images:test
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run NPM Audit CI
        run: cd $GITHUB_WORKSPACE/src/cockpit/389-console && npx --yes audit-ci --config audit-ci.json
