Skip to content

feat: enable npm caching for datadog-ci dependency#37

Merged
watson merged 1 commit intomainfrom
watson/cache-datadog-ci
Jan 19, 2026
Merged

feat: enable npm caching for datadog-ci dependency#37
watson merged 1 commit intomainfrom
watson/cache-datadog-ci

Conversation

@watson
Copy link
Copy Markdown
Collaborator

@watson watson commented Jan 15, 2026

Replace dynamic latest version resolution with a pinned version in package.json to leverage GitHub Actions' built-in npm caching.

Changes:

  • Add package.json with @datadog/[email protected] (latest version when creating this PR)
  • Add package-lock.json for reproducible installs
  • Update action to use npm ci with caching when no custom version specified
  • Add npm ecosystem to Dependabot for automatic version updates

Users can still override with a specific version via datadog-ci-version input, but leaving it empty (default) now uses the cached bundled version.

The largest change that a user of this action will see after upgrading to a version with this change, is that they will no longer automatically get new versions of datadog-ci without also having to upgrade the action version. You can argue that this is actually a feature, as it's pinning the version of datadog-ci, which from a security point of view is actually a good thing.

Note to reviewers

I force version 2 of the npm lock file to retain support for Node.js 14 which ships with npm v6.

Copy link
Copy Markdown
Collaborator Author

watson commented Jan 15, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@watson watson force-pushed the watson/cache-datadog-ci branch from 8154135 to f1db536 Compare January 15, 2026 12:03
Replace dynamic `latest` version resolution with a pinned version in
package.json to leverage GitHub Actions' built-in npm caching.

Changes:
- Add package.json with @datadog/[email protected]
- Add package-lock.json for reproducible installs
- Update action to use `npm ci` with caching when no custom version specified
- Add npm ecosystem to dependabot for automatic version updates

Users can still override with a specific version via `datadog-ci-version`
input, but leaving it empty (default) now uses the cached bundled version.
@watson watson force-pushed the watson/cache-datadog-ci branch from f1db536 to 6f5c00f Compare January 15, 2026 12:04
@watson watson marked this pull request as ready for review January 15, 2026 12:05
@watson watson requested review from a team as code owners January 15, 2026 12:05
@watson watson requested a review from afontan January 15, 2026 12:05
Copy link
Copy Markdown
Contributor

@juan-fernandez juan-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this!

@watson watson merged commit a0226c9 into main Jan 19, 2026
10 checks passed
@watson watson deleted the watson/cache-datadog-ci branch January 19, 2026 14:34
juan-fernandez added a commit that referenced this pull request Jan 21, 2026
juan-fernandez added a commit that referenced this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants