Skip to content

Commit 37c4609

Browse files
wochingeclaude
andauthored
ci(GitHub actions): pin GitHub actions, configure dependabot alerts for GitHub actions (#761)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent db701d0 commit 37c4609

8 files changed

Lines changed: 58 additions & 43 deletions

File tree

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ updates:
1414
prefix: chore
1515
prefix-development: chore
1616
include: scope
17+
- package-ecosystem: github-actions
18+
directory: "/"
19+
schedule:
20+
interval: weekly
21+
commit-message:
22+
prefix: ci
23+
include: scope
24+
groups:
25+
github-actions:
26+
patterns:
27+
- "*"
1728
#this in combination makes dependabot to ignore all dependencies found in the examples folder
1829
- package-ecosystem: "npm"
1930
directory: "/examples"

.github/workflows/ci.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ jobs:
2121
LANGFUSE_PUBLIC_KEY: "pk-lf-1234567890"
2222
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2323
steps:
24-
- uses: actions/checkout@v3
25-
- uses: pnpm/action-setup@v3
26-
with:
27-
version: 9.5.0
28-
- uses: actions/setup-node@v3
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
25+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
26+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2927
with:
3028
node-version: 20
3129
- run: pnpm install
@@ -41,26 +39,24 @@ jobs:
4139
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
4240

4341
steps:
44-
- uses: actions/checkout@v3
45-
- uses: pnpm/action-setup@v3
46-
with:
47-
version: 9.5.0
42+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
43+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
4844

4945
- name: Clone langfuse server
5046
run: |
5147
git clone https://github.com/langfuse/langfuse.git ./langfuse-server
5248
5349
- name: Cache langfuse server dependencies
54-
uses: actions/cache@v3
50+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
5551
with:
5652
path: ./langfuse-server/node_modules
5753
key: |
5854
langfuse-server-${{ hashFiles('./langfuse-server/package-lock.json') }}
5955
langfuse-server-
6056
61-
- uses: actions/setup-node@v3
57+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6258
with:
63-
node-version: 20
59+
node-version: 24 # https://github.com/langfuse/langfuse/blob/main/package.json#L8
6460

6561
- name: Run langfuse server
6662
run: |
@@ -121,11 +117,9 @@ jobs:
121117
timeout-minutes: 3
122118
runs-on: ubuntu-latest
123119
steps:
124-
- uses: actions/checkout@v3
125-
- uses: pnpm/action-setup@v3
126-
with:
127-
version: 9.5.0
128-
- uses: actions/setup-node@v3
120+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
121+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
122+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
129123
with:
130124
node-version: 20
131125

.github/workflows/claude-review-maintainer-prs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: Check author permission and existing review request
1818
id: check
19-
uses: actions/github-script@v7
19+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
2020
with:
2121
script: |
2222
const owner = context.repo.owner;
@@ -57,7 +57,7 @@ jobs:
5757
5858
- name: Add Claude review comment
5959
if: steps.check.outputs.should_comment == 'true'
60-
uses: actions/github-script@v7
60+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
6161
with:
6262
script: |
6363
await github.rest.issues.createComment({

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@v3
49+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v2
53+
uses: github/codeql-action/init@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@v2
71+
uses: github/codeql-action/autobuild@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@v2
84+
uses: github/codeql-action/analyze@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/dependabot-rebase-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: "Rebase open Dependabot PR"
14-
uses: orange-buffalo/dependabot-auto-rebase@v1
14+
uses: orange-buffalo/dependabot-auto-rebase@fa9e05d7a8152381af0a92ffca942a0d46712544 # v1
1515
with:
1616
api-token: ${{ secrets.DEP_REBASE_PAT }}
1717
repository: ${{ github.repository }}

.github/workflows/release.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ jobs:
6161
exit 1
6262
fi
6363
- name: Checkout repository
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6565
with:
6666
fetch-depth: 0
6767
token: ${{ secrets.GH_ACCESS_TOKEN }}
6868

6969
- name: Setup pnpm
70-
uses: pnpm/action-setup@v3
71-
with:
72-
version: 9.15.0
70+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
7371

7472
- name: Setup Node.js
75-
uses: actions/setup-node@v4
73+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
7674
with:
7775
node-version: 24
7876
registry-url: "https://registry.npmjs.org"
@@ -232,7 +230,7 @@ jobs:
232230
233231
- name: Upload release artifacts to GitHub Release
234232
if: inputs.dry_run == false
235-
uses: softprops/action-gh-release@v2
233+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
236234
with:
237235
tag_name: v${{ steps.version.outputs.version }}
238236
files: release-artifacts/*.tar.gz
@@ -242,8 +240,10 @@ jobs:
242240

243241
- name: Notify Slack on success
244242
if: success() && inputs.dry_run == false
245-
uses: slackapi/slack-github-action@v1.26.0
243+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3
246244
with:
245+
webhook: ${{ secrets.SLACK_WEBHOOK_RELEASES }}
246+
webhook-type: incoming-webhook
247247
payload: |
248248
{
249249
"text": "✅ Langfuse JS/TS SDK v${{ steps.version.outputs.version }} published to npm",
@@ -331,14 +331,13 @@ jobs:
331331
}
332332
]
333333
}
334-
env:
335-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_RELEASES }}
336-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
337334
338335
- name: Notify Slack on dry run success
339336
if: success() && inputs.dry_run == true
340-
uses: slackapi/slack-github-action@v1.26.0
337+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3
341338
with:
339+
webhook: ${{ secrets.SLACK_WEBHOOK_ENGINEERING }}
340+
webhook-type: incoming-webhook
342341
payload: |
343342
{
344343
"text": "🧪 Langfuse JS/TS SDK dry run completed for v${{ steps.version.outputs.version }}",
@@ -414,14 +413,13 @@ jobs:
414413
}
415414
]
416415
}
417-
env:
418-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ENGINEERING }}
419-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
420416
421417
- name: Notify Slack on failure
422418
if: failure()
423-
uses: slackapi/slack-github-action@v1.26.0
419+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3
424420
with:
421+
webhook: ${{ secrets.SLACK_WEBHOOK_ENGINEERING }}
422+
webhook-type: incoming-webhook
425423
payload: |
426424
{
427425
"text": "❌ Langfuse JS/TS SDK release workflow failed",
@@ -507,9 +505,6 @@ jobs:
507505
}
508506
]
509507
}
510-
env:
511-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ENGINEERING }}
512-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
513508
514509
- name: Rollback notification on partial failure
515510
if: failure() && steps.release.outcome == 'success'

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"devDependencies": {
3535
"@ai-sdk/anthropic": "^2",
3636
"@ai-sdk/openai": "^2",
37+
"@eslint/js": "^9.32.0",
3738
"@langchain/core": "^1.1.24",
3839
"@langchain/langgraph": "^1.1.4",
3940
"@langchain/openai": "^1.2.7",
@@ -76,5 +77,5 @@
7677
"resolutions": {
7778
"ml-spectra-processing": "14.14.0"
7879
},
79-
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
80+
"packageManager": "pnpm@10.33.0"
8081
}

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)