Merge pull request #836 from actions/dependencies

Update Dependabot Grouping
This commit is contained in:
Nick Alteen 2023-12-01 11:34:06 -05:00 committed by GitHub
commit d8ead2e55b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 21 deletions

View File

@ -4,8 +4,23 @@ updates:
directory: / directory: /
schedule: schedule:
interval: weekly interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch
- package-ecosystem: npm - package-ecosystem: npm
directory: / directory: /
schedule: schedule:
interval: weekly interval: weekly
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- patch

View File

@ -1,19 +1,19 @@
# In TypeScript actions, `dist/index.js` is a special file. When you reference # In TypeScript actions, `dist/` is a special directory. When you reference
# an action with `uses:`, `dist/index.js` is the code that will be run. For this # an action with the `uses:` property, `dist/index.js` is the code that will be
# project, the `dist/index.js` file is generated from other source files through # run. For this project, the `dist/index.js` file is transpiled from other
# the build process. We need to make sure that the checked-in `dist/index.js` # source files. This workflow ensures the `dist/` directory contains the
# file matches what is expected from the build. # expected transpiled code.
# #
# This workflow will fail if the checked-in `dist/index.js` file does not match # If this workflow is run from a feature branch, it will act as an additional CI
# what is expected from the build. # check and fail if the checked-in `dist/` directory does not match what is
name: Check dist/ # expected from the build.
name: Check Transpiled JavaScript
on: on:
push: push:
branches: branches:
- main - main
pull_request: pull_request:
workflow_dispatch:
permissions: permissions:
contents: read contents: read
@ -29,6 +29,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Node.js - name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: .node-version node-version-file: .node-version
@ -42,7 +43,8 @@ jobs:
id: build id: build
run: npm run bundle run: npm run bundle
- name: Compare Expected and Actual Directories # This will fail the workflow if the PR wasn't created by Dependabot.
- name: Compare Directories
id: diff id: diff
run: | run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
@ -51,10 +53,12 @@ jobs:
exit 1 exit 1
fi fi
# If index.js was different than expected, upload the expected version as # If `dist/` was different than expected, and this was not a Dependabot
# a workflow artifact. # PR, upload the expected version as a workflow artifact.
- uses: actions/upload-artifact@v3 - if: ${{ failure() && steps.diff.outcome == 'failure' }}
if: ${{ failure() && steps.diff.conclusion == 'failure' }} name: Upload Artifact
id: upload
uses: actions/upload-artifact@v3
with: with:
name: dist name: dist
path: dist/ path: dist/

View File

@ -5,7 +5,6 @@ on:
push: push:
branches: branches:
- main - main
- 'releases/*'
permissions: permissions:
contents: read contents: read
@ -56,7 +55,7 @@ jobs:
id: test-action id: test-action
uses: ./ uses: ./
with: with:
milliseconds: 1000 milliseconds: 2000
- name: Print Output - name: Print Output
id: output id: output

View File

@ -1,20 +1,19 @@
name: Lint Code Base name: Lint Codebase
on: on:
pull_request: pull_request:
branches:
- main
push: push:
branches: branches:
- main - main
permissions: permissions:
contents: read contents: read
packages: read
statuses: write statuses: write
jobs: jobs:
lint: lint:
name: Lint Code Base name: Lint Codebase
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -33,11 +32,14 @@ jobs:
id: install id: install
run: npm ci run: npm ci
- name: Lint Code Base - name: Lint Codebase
id: super-linter id: super-linter
uses: super-linter/super-linter/slim@v5 uses: super-linter/super-linter/slim@v5
env: env:
DEFAULT_BRANCH: main DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: dist/**/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false VALIDATE_JSCPD: false