Skip to content

Commit ae38580

Browse files
committed
- don't run npm ci in the dependabot job
1 parent 06075f3 commit ae38580

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ updates:
1212
interval: "weekly"
1313
day: "monday"
1414
time: "06:00"
15+
env:
16+
DEPENDABOT_JOB: "true"
1517
commit-message:
1618
prefix: chore
17-
# TODO - add labels
18-
# labels:
19-
# - "dependencies"
20-
# - "ruby"
21-
# - "automated-pr"
2219
open-pull-requests-limit: 5
2320

2421
# 2. Update GitHub Actions (keeps your CI workflows secure)

govuk_tech_docs.gemspec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ lib = File.expand_path("lib", __dir__)
44
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
55
require "govuk_tech_docs/version"
66

7-
`npm ci`
8-
abort "npm ci failed" unless $CHILD_STATUS.success?
7+
if ENV["DEPENDABOT_JOB"] == "true" # dependabot will only evaluate the bundler, and will not allow npm
8+
warn "Skipping npm ci due to DEPENDABOT_JOB=true"
9+
else
10+
system("npm ci")
11+
abort "npm ci failed" unless $CHILD_STATUS.success?
12+
end
913

1014
unless File.exist?("node_modules/govuk-frontend/dist/govuk/_base.scss")
1115
abort "govuk-frontend npm package not installed"
@@ -45,9 +49,7 @@ Gem::Specification.new do |spec|
4549
spec.add_dependency "middleman-compass"
4650
spec.add_dependency "middleman-livereload"
4751
spec.add_dependency "middleman-search-gds"
48-
=begin
49-
middleman-sprockets is very old and out of date. V4.1.0 has a breaking change. Will look to replace with gem "dartsass-sprockets" or uses sass in the package.json
50-
=end
52+
# middleman-sprockets is very old and out of date. V4.1.0 has a breaking change. Will look to replace with gem "dartsass-sprockets" or uses sass in the package.json
5153
spec.add_dependency "middleman-sprockets", "4.0.0"
5254
spec.add_dependency "middleman-syntax"
5355
spec.add_dependency "mutex_m" # TODO: remove once activesupport declares this itself.

0 commit comments

Comments
 (0)