diff --git a/src/generators/default-content/templates/configured/_gitignore b/src/generators/default-content/templates/configured/_gitignore index 504afef..c2658d7 100644 --- a/src/generators/default-content/templates/configured/_gitignore +++ b/src/generators/default-content/templates/configured/_gitignore @@ -1,2 +1 @@ node_modules/ -package-lock.json diff --git a/src/generators/default-content/templates/static/.github/dependabot.yml b/src/generators/default-content/templates/static/.github/dependabot.yml index aff82a1..5f609d1 100644 --- a/src/generators/default-content/templates/static/.github/dependabot.yml +++ b/src/generators/default-content/templates/static/.github/dependabot.yml @@ -4,3 +4,7 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + # update-package-lock workflow handles minor/patch updates - delay for a few weeks to give time to handle breaking change in those PRs + default-days: 25 + semver-major-days: 5 \ No newline at end of file diff --git a/src/generators/default-content/templates/static/.github/workflows/update-package-lock.yml b/src/generators/default-content/templates/static/.github/workflows/update-package-lock.yml new file mode 100644 index 0000000..fea766b --- /dev/null +++ b/src/generators/default-content/templates/static/.github/workflows/update-package-lock.yml @@ -0,0 +1,29 @@ +name: Update package-lock.json +on: + schedule: + - cron: "30 12 * * 1-5" # Mon-Fri 8:30AM EDT. 7:30AM EST. + workflow_dispatch: # manual trigger +jobs: + update: + name: Update + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - uses: Brightspace/third-party-actions@actions/checkout + with: + token: ${{ secrets.PR_GITHUB_TOKEN }} + - uses: Brightspace/third-party-actions@actions/setup-node + with: + node-version-file: .nvmrc + cache: 'npm' + - name: Update package-lock.json + uses: BrightspaceUI/actions/update-package-lock@main + with: + AUTO_MERGE_METHOD: squash + # update-package-lock set up instructions: https://github.com/BrightspaceUI/create/tree/main?tab=readme-ov-file#additional-setup + AUTO_MERGE_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }} + APPROVAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }} + SLACK_CHANNEL_FAILURE: '#your-team-dev-alerts' + SLACK_CHANNEL_STALE_PR: '#your-team-dev-alerts' + SLACK_TOKEN: ${{ secrets.D2L_SLACK_TOKEN }} diff --git a/src/generators/test-unit-axe/templates/static/.github/workflows/ci-test-reporting.yml b/src/generators/test-unit-axe/templates/static/.github/workflows/ci-test-reporting.yml index b6d6337..fcb9b0f 100644 --- a/src/generators/test-unit-axe/templates/static/.github/workflows/ci-test-reporting.yml +++ b/src/generators/test-unit-axe/templates/static/.github/workflows/ci-test-reporting.yml @@ -12,8 +12,9 @@ jobs: uses: Brightspace/third-party-actions@actions/setup-node with: node-version-file: .nvmrc + cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Lint (JavaScript) run: npm run lint:eslint - name: Lint (CSS) diff --git a/src/generators/test-unit-axe/templates/static/.github/workflows/ci.yml b/src/generators/test-unit-axe/templates/static/.github/workflows/ci.yml index 52559fd..2bd3661 100644 --- a/src/generators/test-unit-axe/templates/static/.github/workflows/ci.yml +++ b/src/generators/test-unit-axe/templates/static/.github/workflows/ci.yml @@ -10,8 +10,9 @@ jobs: - uses: Brightspace/third-party-actions@actions/setup-node with: node-version-file: .nvmrc + cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Lint (JavaScript) run: npm run lint:eslint - name: Lint (CSS) diff --git a/src/generators/test-vdiff/templates/static/.github/workflows/vdiff-test-reporting.yml b/src/generators/test-vdiff/templates/static/.github/workflows/vdiff-test-reporting.yml index 91a9a76..50fb135 100644 --- a/src/generators/test-vdiff/templates/static/.github/workflows/vdiff-test-reporting.yml +++ b/src/generators/test-vdiff/templates/static/.github/workflows/vdiff-test-reporting.yml @@ -9,8 +9,9 @@ jobs: - uses: Brightspace/third-party-actions@actions/setup-node with: node-version-file: .nvmrc + cache: 'npm' - name: Install Dependencies - run: npm install + run: npm ci - name: vdiff Tests uses: BrightspaceUI/actions/vdiff@main with: diff --git a/src/generators/test-vdiff/templates/static/.github/workflows/vdiff.yml b/src/generators/test-vdiff/templates/static/.github/workflows/vdiff.yml index 9d2836c..20e1648 100644 --- a/src/generators/test-vdiff/templates/static/.github/workflows/vdiff.yml +++ b/src/generators/test-vdiff/templates/static/.github/workflows/vdiff.yml @@ -9,8 +9,9 @@ jobs: - uses: Brightspace/third-party-actions@actions/setup-node with: node-version-file: .nvmrc + cache: 'npm' - name: Install Dependencies - run: npm install + run: npm ci - name: vdiff Tests uses: BrightspaceUI/actions/vdiff@main with: