doc-detective 3.4.1-dev.1 → 3.5.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.github/FUNDING.yml +14 -14
  2. package/.github/dependabot.yml +11 -11
  3. package/.github/workflows/auto-dev-release.yml +173 -173
  4. package/.github/workflows/npm-test.yaml +96 -96
  5. package/.github/workflows/update-core.yaml +131 -131
  6. package/CONTRIBUTIONS.md +27 -27
  7. package/LICENSE +661 -661
  8. package/README.md +110 -110
  9. package/dev/dev.config.json +8 -3
  10. package/dev/dev.spec.json +30 -30
  11. package/dev/index.js +5 -5
  12. package/package.json +47 -47
  13. package/samples/.doc-detective.json +94 -94
  14. package/samples/doc-content-detect.md +10 -10
  15. package/samples/doc-content-inline-tests.md +23 -23
  16. package/samples/docker-hello.spec.json +15 -15
  17. package/samples/env +2 -2
  18. package/samples/http.spec.yaml +37 -37
  19. package/samples/kitten-search-detect.md +7 -7
  20. package/samples/kitten-search-inline.md +15 -15
  21. package/samples/kitten-search.spec.json +28 -28
  22. package/samples/local-gui.md +5 -5
  23. package/samples/tests.spec.json +70 -70
  24. package/samples/variables.env +4 -4
  25. package/scripts/bump-sync-version-core.js +110 -108
  26. package/src/checkDependencies.js +84 -84
  27. package/src/index.js +72 -72
  28. package/src/utils.js +1023 -1023
  29. package/test/artifacts/cleanup.spec.json +18 -18
  30. package/test/artifacts/config.json +6 -6
  31. package/test/artifacts/doc-content.md +23 -23
  32. package/test/artifacts/env +2 -2
  33. package/test/artifacts/httpRequest.spec.yaml +37 -37
  34. package/test/artifacts/runShell.spec.json +29 -29
  35. package/test/artifacts/setup.spec.json +18 -18
  36. package/test/artifacts/test.spec.json +46 -46
  37. package/test/resolvedTests.test.js +193 -193
  38. package/test/runTests.test.js +53 -53
  39. package/test/server/index.js +185 -185
  40. package/test/server/public/index.html +174 -174
  41. package/test/test-config.json +12 -12
  42. package/test/test-results.json +124 -124
  43. package/test/utils.test.js +298 -298
  44. package/reference.png +0 -0
@@ -1,14 +1,14 @@
1
- # These are supported funding model platforms
2
-
3
- github: [doc-detective] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: doc-detective # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13
- polar: # Replace with a single Polar username
14
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
1
+ # These are supported funding model platforms
2
+
3
+ github: [doc-detective] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: doc-detective # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13
+ polar: # Replace with a single Polar username
14
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -1,11 +1,11 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "npm" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- schedule:
11
- interval: "weekly"
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "npm" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
@@ -1,174 +1,174 @@
1
- name: Auto Dev Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- # Don't trigger on release events to avoid conflicts with main release workflow
8
- workflow_dispatch:
9
- # Allow manual triggering for testing
10
-
11
- jobs:
12
- auto-dev-release:
13
- runs-on: ubuntu-latest
14
- timeout-minutes: 10
15
- # Skip if this is a release commit or docs-only changes
16
- if: |
17
- !contains(github.event.head_commit.message, '[skip ci]') &&
18
- !contains(github.event.head_commit.message, 'Release') &&
19
- github.event_name != 'release'
20
-
21
- steps:
22
- - name: Checkout code
23
- uses: actions/checkout@v4
24
- with:
25
- # Need full history for proper version bumping
26
- fetch-depth: 0
27
- # Use a token that can push back to the repo
28
- token: ${{ secrets.DD_DEP_UPDATE_TOKEN }}
29
-
30
- - name: Setup Node.js
31
- uses: actions/setup-node@v4
32
- with:
33
- node-version: '22'
34
- cache: 'npm'
35
- cache-dependency-path: package-lock.json
36
- registry-url: 'https://registry.npmjs.org/'
37
-
38
- - name: Check for documentation-only changes
39
- id: check_changes
40
- run: |
41
- # Always release on workflow_dispatch
42
- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
43
- echo "skip_release=false" >> $GITHUB_OUTPUT
44
- echo "Manual trigger: proceeding with release"
45
- exit 0
46
- fi
47
-
48
- # Get list of changed files
49
- CHANGED_FILES=$(git diff --name-only ${{ github.event.before }}..${{ github.event.after }})
50
-
51
- echo "Changed files:"
52
- echo "$CHANGED_FILES"
53
-
54
- # Check if only documentation files changed
55
- if echo "$CHANGED_FILES" | grep -v -E '\.(md|txt|yml|yaml)$|^\.github/' | grep -q .; then
56
- echo "skip_release=false" >> $GITHUB_OUTPUT
57
- echo "Code changes detected, proceeding with release"
58
- else
59
- echo "skip_release=true" >> $GITHUB_OUTPUT
60
- echo "Only documentation changes detected, skipping release"
61
- fi
62
-
63
- - name: Validate package.json
64
- if: steps.check_changes.outputs.skip_release == 'false'
65
- run: |
66
- # Validate package.json exists and is valid JSON
67
- if [ ! -f "package.json" ]; then
68
- echo "❌ package.json not found"
69
- exit 1
70
- fi
71
-
72
- # Validate JSON syntax
73
- if ! node -p "JSON.parse(require('fs').readFileSync('package.json', 'utf8'))" > /dev/null 2>&1; then
74
- echo "❌ package.json is not valid JSON"
75
- exit 1
76
- fi
77
-
78
- # Check for required fields
79
- if ! node -p "require('./package.json').name" > /dev/null 2>&1; then
80
- echo "❌ package.json missing 'name' field"
81
- exit 1
82
- fi
83
-
84
- if ! node -p "require('./package.json').version" > /dev/null 2>&1; then
85
- echo "❌ package.json missing 'version' field"
86
- exit 1
87
- fi
88
-
89
- echo "✅ package.json validation passed"
90
-
91
- - name: Install dependencies
92
- if: steps.check_changes.outputs.skip_release == 'false'
93
- run: npm ci
94
-
95
- - name: Run tests
96
- if: steps.check_changes.outputs.skip_release == 'false'
97
- run: npm test
98
-
99
- - name: Configure Git
100
- run: |
101
- git config --global user.name 'github-actions[bot]'
102
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
103
-
104
- - name: Generate dev version
105
- if: steps.check_changes.outputs.skip_release == 'false'
106
- id: version
107
- run: |
108
- # Get current version from package.json
109
- CURRENT_VERSION=$(node -p "require('./package.json').version")
110
- echo "Current version: $CURRENT_VERSION"
111
-
112
- # Extract base version (remove existing -dev.X suffix if present)
113
- BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-dev\.[0-9]*$//')
114
- echo "Base version: $BASE_VERSION"
115
-
116
- # Check if we need to get the latest dev version from npm
117
- LATEST_DEV=$(npm view doc-detective@dev version 2>/dev/null || echo "")
118
-
119
- if [ -n "$LATEST_DEV" ] && [[ $LATEST_DEV == $BASE_VERSION-dev.* ]]; then
120
- # Extract the dev number and increment it
121
- DEV_NUM=$(echo $LATEST_DEV | grep -o 'dev\.[0-9]*$' | grep -o '[0-9]*$')
122
- NEW_DEV_NUM=$((DEV_NUM + 1))
123
- else
124
- # Start with dev.1
125
- NEW_DEV_NUM=1
126
- fi
127
-
128
- NEW_VERSION="$BASE_VERSION-dev.$NEW_DEV_NUM"
129
- echo "New version: $NEW_VERSION"
130
-
131
- # Update package.json
132
- npm version $NEW_VERSION --no-git-tag-version
133
-
134
- # Set outputs
135
- echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
136
- echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
137
-
138
- - name: Commit version change
139
- if: steps.check_changes.outputs.skip_release == 'false'
140
- run: |
141
- git add package.json package-lock.json
142
- git commit -m "Auto dev release: v${{ steps.version.outputs.version }} [skip ci]"
143
-
144
- - name: Create and push git tag
145
- if: steps.check_changes.outputs.skip_release == 'false'
146
- run: |
147
- git tag "v${{ steps.version.outputs.version }}"
148
- git push origin "v${{ steps.version.outputs.version }}"
149
- git push origin main
150
-
151
- - name: Publish to npm
152
- if: steps.check_changes.outputs.skip_release == 'false'
153
- run: |
154
- # Add error handling for npm publish
155
- set -e
156
- echo "📦 Publishing to npm with 'dev' tag..."
157
- npm publish --tag dev
158
- echo "✅ Successfully published to npm"
159
- env:
160
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
161
-
162
- - name: Summary
163
- if: steps.check_changes.outputs.skip_release == 'false'
164
- run: |
165
- echo "✅ Auto dev release completed successfully!"
166
- echo "📦 Version: v${{ steps.version.outputs.version }}"
167
- echo "🏷️ NPM Tag: dev"
168
- echo "📋 Install with: npm install doc-detective@dev"
169
-
170
- - name: Skip summary
171
- if: steps.check_changes.outputs.skip_release == 'true'
172
- run: |
173
- echo "⏭️ Auto dev release skipped"
1
+ name: Auto Dev Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ # Don't trigger on release events to avoid conflicts with main release workflow
8
+ workflow_dispatch:
9
+ # Allow manual triggering for testing
10
+
11
+ jobs:
12
+ auto-dev-release:
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 10
15
+ # Skip if this is a release commit or docs-only changes
16
+ if: |
17
+ !contains(github.event.head_commit.message, '[skip ci]') &&
18
+ !contains(github.event.head_commit.message, 'Release') &&
19
+ github.event_name != 'release'
20
+
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ # Need full history for proper version bumping
26
+ fetch-depth: 0
27
+ # Use a token that can push back to the repo
28
+ token: ${{ secrets.DD_DEP_UPDATE_TOKEN }}
29
+
30
+ - name: Setup Node.js
31
+ uses: actions/setup-node@v4
32
+ with:
33
+ node-version: '22'
34
+ cache: 'npm'
35
+ cache-dependency-path: package-lock.json
36
+ registry-url: 'https://registry.npmjs.org/'
37
+
38
+ - name: Check for documentation-only changes
39
+ id: check_changes
40
+ run: |
41
+ # Always release on workflow_dispatch
42
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
43
+ echo "skip_release=false" >> $GITHUB_OUTPUT
44
+ echo "Manual trigger: proceeding with release"
45
+ exit 0
46
+ fi
47
+
48
+ # Get list of changed files
49
+ CHANGED_FILES=$(git diff --name-only ${{ github.event.before }}..${{ github.event.after }})
50
+
51
+ echo "Changed files:"
52
+ echo "$CHANGED_FILES"
53
+
54
+ # Check if only documentation files changed
55
+ if echo "$CHANGED_FILES" | grep -v -E '\.(md|txt|yml|yaml)$|^\.github/' | grep -q .; then
56
+ echo "skip_release=false" >> $GITHUB_OUTPUT
57
+ echo "Code changes detected, proceeding with release"
58
+ else
59
+ echo "skip_release=true" >> $GITHUB_OUTPUT
60
+ echo "Only documentation changes detected, skipping release"
61
+ fi
62
+
63
+ - name: Validate package.json
64
+ if: steps.check_changes.outputs.skip_release == 'false'
65
+ run: |
66
+ # Validate package.json exists and is valid JSON
67
+ if [ ! -f "package.json" ]; then
68
+ echo "❌ package.json not found"
69
+ exit 1
70
+ fi
71
+
72
+ # Validate JSON syntax
73
+ if ! node -p "JSON.parse(require('fs').readFileSync('package.json', 'utf8'))" > /dev/null 2>&1; then
74
+ echo "❌ package.json is not valid JSON"
75
+ exit 1
76
+ fi
77
+
78
+ # Check for required fields
79
+ if ! node -p "require('./package.json').name" > /dev/null 2>&1; then
80
+ echo "❌ package.json missing 'name' field"
81
+ exit 1
82
+ fi
83
+
84
+ if ! node -p "require('./package.json').version" > /dev/null 2>&1; then
85
+ echo "❌ package.json missing 'version' field"
86
+ exit 1
87
+ fi
88
+
89
+ echo "✅ package.json validation passed"
90
+
91
+ - name: Install dependencies
92
+ if: steps.check_changes.outputs.skip_release == 'false'
93
+ run: npm ci
94
+
95
+ - name: Run tests
96
+ if: steps.check_changes.outputs.skip_release == 'false'
97
+ run: npm test
98
+
99
+ - name: Configure Git
100
+ run: |
101
+ git config --global user.name 'github-actions[bot]'
102
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
103
+
104
+ - name: Generate dev version
105
+ if: steps.check_changes.outputs.skip_release == 'false'
106
+ id: version
107
+ run: |
108
+ # Get current version from package.json
109
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
110
+ echo "Current version: $CURRENT_VERSION"
111
+
112
+ # Extract base version (remove existing -dev.X suffix if present)
113
+ BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-dev\.[0-9]*$//')
114
+ echo "Base version: $BASE_VERSION"
115
+
116
+ # Check if we need to get the latest dev version from npm
117
+ LATEST_DEV=$(npm view doc-detective@dev version 2>/dev/null || echo "")
118
+
119
+ if [ -n "$LATEST_DEV" ] && [[ $LATEST_DEV == $BASE_VERSION-dev.* ]]; then
120
+ # Extract the dev number and increment it
121
+ DEV_NUM=$(echo $LATEST_DEV | grep -o 'dev\.[0-9]*$' | grep -o '[0-9]*$')
122
+ NEW_DEV_NUM=$((DEV_NUM + 1))
123
+ else
124
+ # Start with dev.1
125
+ NEW_DEV_NUM=1
126
+ fi
127
+
128
+ NEW_VERSION="$BASE_VERSION-dev.$NEW_DEV_NUM"
129
+ echo "New version: $NEW_VERSION"
130
+
131
+ # Update package.json
132
+ npm version $NEW_VERSION --no-git-tag-version
133
+
134
+ # Set outputs
135
+ echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
136
+ echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
137
+
138
+ - name: Commit version change
139
+ if: steps.check_changes.outputs.skip_release == 'false'
140
+ run: |
141
+ git add package.json package-lock.json
142
+ git commit -m "Auto dev release: v${{ steps.version.outputs.version }} [skip ci]"
143
+
144
+ - name: Create and push git tag
145
+ if: steps.check_changes.outputs.skip_release == 'false'
146
+ run: |
147
+ git tag "v${{ steps.version.outputs.version }}"
148
+ git push origin "v${{ steps.version.outputs.version }}"
149
+ git push origin main
150
+
151
+ - name: Publish to npm
152
+ if: steps.check_changes.outputs.skip_release == 'false'
153
+ run: |
154
+ # Add error handling for npm publish
155
+ set -e
156
+ echo "📦 Publishing to npm with 'dev' tag..."
157
+ npm publish --tag dev
158
+ echo "✅ Successfully published to npm"
159
+ env:
160
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
161
+
162
+ - name: Summary
163
+ if: steps.check_changes.outputs.skip_release == 'false'
164
+ run: |
165
+ echo "✅ Auto dev release completed successfully!"
166
+ echo "📦 Version: v${{ steps.version.outputs.version }}"
167
+ echo "🏷️ NPM Tag: dev"
168
+ echo "📋 Install with: npm install doc-detective@dev"
169
+
170
+ - name: Skip summary
171
+ if: steps.check_changes.outputs.skip_release == 'true'
172
+ run: |
173
+ echo "⏭️ Auto dev release skipped"
174
174
  echo "📝 Only documentation changes detected"
@@ -1,96 +1,96 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Test (& Publish)
5
-
6
- on:
7
- push:
8
- branches:
9
- - main
10
- pull_request:
11
- types:
12
- - opened
13
- - reopened
14
- - synchronize
15
- release:
16
- types:
17
- - published
18
- workflow_dispatch:
19
-
20
- jobs:
21
- test:
22
- runs-on: ${{ matrix.os }}
23
- timeout-minutes: 10
24
- strategy:
25
- matrix:
26
- os:
27
- - ubuntu-latest
28
- - windows-latest
29
- - macos-latest
30
- node:
31
- - 18
32
- - 20
33
- - 22
34
- - 24
35
- steps:
36
- - uses: actions/checkout@v4
37
-
38
- - uses: actions/setup-node@v4
39
- with:
40
- node-version: ${{ matrix.node }}
41
- cache: 'npm'
42
- cache-dependency-path: package-lock.json
43
-
44
- - run: npm ci
45
- - run: npm test
46
-
47
- publish-npm:
48
- if: github.event_name == 'release' && github.event.action == 'published'
49
- needs: test
50
- runs-on: ubuntu-latest
51
- permissions:
52
- contents: write
53
- steps:
54
- - uses: actions/checkout@v4
55
- - uses: actions/setup-node@v4
56
- with:
57
- cache: 'npm'
58
- cache-dependency-path: package-lock.json
59
- registry-url: https://registry.npmjs.org/
60
-
61
- - run: npm ci
62
- - run: npm publish
63
- env:
64
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
65
-
66
- test-github-action:
67
- name: Test GitHub Action
68
- needs: publish-npm
69
- runs-on: ubuntu-latest
70
- steps:
71
- - uses: actions/checkout@v4
72
- - uses: doc-detective/github-action@latest
73
- id: dd
74
- with:
75
- config: ./test/artifacts/config.json
76
- input: ./test/artifacts/doc-content.md
77
- exit_on_fail: "true"
78
-
79
- build-docker-image:
80
- name: Build Docker Image
81
- needs: publish-npm
82
- runs-on: ubuntu-latest
83
- steps:
84
- - uses: actions/checkout@v4
85
-
86
- - name: Get package version
87
- id: get_version
88
- run: |
89
- echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
90
-
91
- - name: Trigger GitHub Action in docker-image repo
92
- run: |
93
- curl -X POST -H "Authorization: token ${{ secrets.DD_DEP_UPDATE_TOKEN }}" \
94
- -H "Accept: application/vnd.github.everest-preview+json" \
95
- "https://api.github.com/repos/doc-detective/docker-image/dispatches" \
96
- -d '{ "event_type": "build-push", "client_payload": { "version": "${{ steps.get_version.outputs.version }}", "additional_info": "triggered from npm-publish workflow" } }'
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Test (& Publish)
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ pull_request:
11
+ types:
12
+ - opened
13
+ - reopened
14
+ - synchronize
15
+ release:
16
+ types:
17
+ - published
18
+ workflow_dispatch:
19
+
20
+ jobs:
21
+ test:
22
+ runs-on: ${{ matrix.os }}
23
+ timeout-minutes: 10
24
+ strategy:
25
+ matrix:
26
+ os:
27
+ - ubuntu-latest
28
+ - windows-latest
29
+ - macos-latest
30
+ node:
31
+ - 18
32
+ - 20
33
+ - 22
34
+ - 24
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+
38
+ - uses: actions/setup-node@v4
39
+ with:
40
+ node-version: ${{ matrix.node }}
41
+ cache: 'npm'
42
+ cache-dependency-path: package-lock.json
43
+
44
+ - run: npm ci
45
+ - run: npm test
46
+
47
+ publish-npm:
48
+ if: github.event_name == 'release' && github.event.action == 'published'
49
+ needs: test
50
+ runs-on: ubuntu-latest
51
+ permissions:
52
+ contents: write
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+ - uses: actions/setup-node@v4
56
+ with:
57
+ cache: 'npm'
58
+ cache-dependency-path: package-lock.json
59
+ registry-url: https://registry.npmjs.org/
60
+
61
+ - run: npm ci
62
+ - run: npm publish
63
+ env:
64
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
65
+
66
+ test-github-action:
67
+ name: Test GitHub Action
68
+ needs: publish-npm
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - uses: doc-detective/github-action@latest
73
+ id: dd
74
+ with:
75
+ config: ./test/artifacts/config.json
76
+ input: ./test/artifacts/doc-content.md
77
+ exit_on_fail: "true"
78
+
79
+ build-docker-image:
80
+ name: Build Docker Image
81
+ needs: publish-npm
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+
86
+ - name: Get package version
87
+ id: get_version
88
+ run: |
89
+ echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
90
+
91
+ - name: Trigger GitHub Action in docker-image repo
92
+ run: |
93
+ curl -X POST -H "Authorization: token ${{ secrets.DD_DEP_UPDATE_TOKEN }}" \
94
+ -H "Accept: application/vnd.github.everest-preview+json" \
95
+ "https://api.github.com/repos/doc-detective/docker-image/dispatches" \
96
+ -d '{ "event_type": "build-push", "client_payload": { "version": "${{ steps.get_version.outputs.version }}", "additional_info": "triggered from npm-publish workflow" } }'