From 2a9e4e08ae1b727e1e0b2cdb66e876d6685841f0 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 27 Nov 2023 23:41:01 -0500 Subject: [PATCH 1/5] Add dependabot grouping --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8b2c4c0..742ec57 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,23 @@ updates: directory: / schedule: interval: weekly + groups: + actions-minor: + update-types: + - minor + - patch - package-ecosystem: npm directory: / schedule: interval: weekly + groups: + npm-development: + dependency-type: development + update-types: + - minor + - patch + npm-production: + dependency-type: production + update-types: + - patch From 693b3bccae39b2e1f9a4960c314b2493433c2f94 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 27 Nov 2023 23:41:15 -0500 Subject: [PATCH 2/5] Expand workflow comments --- .github/workflows/check-dist.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 444f1a9..f849ed3 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -1,19 +1,19 @@ -# In TypeScript actions, `dist/index.js` is a special file. When you reference -# an action with `uses:`, `dist/index.js` is the code that will be run. For this -# project, the `dist/index.js` file is generated from other source files through -# the build process. We need to make sure that the checked-in `dist/index.js` -# file matches what is expected from the build. +# In TypeScript actions, `dist/` is a special directory. When you reference +# an action with the `uses:` property, `dist/index.js` is the code that will be +# run. For this project, the `dist/index.js` file is transpiled from other +# source files. This workflow ensures the `dist/` directory contains the +# expected transpiled code. # -# This workflow will fail if the checked-in `dist/index.js` file does not match -# what is expected from the build. -name: Check dist/ +# If this workflow is run from a feature branch, it will act as an additional CI +# check and fail if the checked-in `dist/` directory does not match what is +# expected from the build. +name: Check Transpiled JavaScript on: push: branches: - main pull_request: - workflow_dispatch: permissions: contents: read @@ -29,6 +29,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node.js + id: setup-node uses: actions/setup-node@v4 with: node-version-file: .node-version @@ -42,7 +43,8 @@ jobs: id: build 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 run: | if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then @@ -51,10 +53,12 @@ jobs: exit 1 fi - # If index.js was different than expected, upload the expected version as - # a workflow artifact. - - uses: actions/upload-artifact@v3 - if: ${{ failure() && steps.diff.conclusion == 'failure' }} + # If `dist/` was different than expected, and this was not a Dependabot + # PR, upload the expected version as a workflow artifact. + - if: ${{ failure() && steps.diff.outcome == 'failure' }} + name: Upload Artifact + id: upload + uses: actions/upload-artifact@v3 with: name: dist path: dist/ From ab98397115453c64afe3d2ee47b6bdd15155d129 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 27 Nov 2023 23:41:30 -0500 Subject: [PATCH 3/5] Make consistent with other template actions --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dfab1c..dbc263b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ on: push: branches: - main - - 'releases/*' permissions: contents: read @@ -56,7 +55,7 @@ jobs: id: test-action uses: ./ with: - milliseconds: 1000 + milliseconds: 2000 - name: Print Output id: output From 2cf1c6faee1d05e313978d84bd09cb928415cdba Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 27 Nov 2023 23:41:39 -0500 Subject: [PATCH 4/5] Grammar cleanup --- .github/workflows/linter.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1f1c52c..dcff5e4 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,20 +1,17 @@ -name: Lint Code Base +name: Lint Codebase on: pull_request: - branches: - - main push: branches: - main permissions: contents: read - statuses: write jobs: lint: - name: Lint Code Base + name: Lint Codebase runs-on: ubuntu-latest steps: @@ -33,11 +30,14 @@ jobs: id: install run: npm ci - - name: Lint Code Base + - name: Lint Codebase id: super-linter uses: super-linter/super-linter/slim@v5 env: DEFAULT_BRANCH: main + FILTER_REGEX_EXCLUDE: dist/**/* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier + VALIDATE_ALL_CODEBASE: true + VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_JSCPD: false From ca3370cfd58458898f9fc4d741dced331afb6157 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Fri, 1 Dec 2023 09:09:01 -0500 Subject: [PATCH 5/5] Add missing perms --- .github/workflows/linter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index dcff5e4..dafff7b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -8,6 +8,8 @@ on: permissions: contents: read + packages: read + statuses: write jobs: lint: