Skip to content

Commit 515e8d8

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/setup-node-6.3.0
2 parents 9afcc27 + d67f905 commit 515e8d8

16 files changed

Lines changed: 134 additions & 105 deletions

.github/workflows/actionlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden the runner (Audit all outbound calls)
20-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
20+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2121
with:
2222
egress-policy: audit
2323

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Harden the runner (Audit all outbound calls)
23-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
23+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2424
with:
2525
egress-policy: audit
2626

.github/workflows/check-models.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Harden the runner (Audit all outbound calls)
29-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
29+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
3030
with:
3131
egress-policy: audit
3232

@@ -99,7 +99,7 @@ jobs:
9999
echo ""
100100
echo "=== Copilot CLI Output ==="
101101
102-
cd ${GITHUB_WORKSPACE}
102+
cd "${GITHUB_WORKSPACE}"
103103
104104
# Run copilot with the prompt using non-interactive mode
105105
COPILOT_PROMPT_TEXT=$(cat /tmp/copilot-prompt.md)
@@ -113,29 +113,29 @@ jobs:
113113
run: |
114114
if git diff --quiet src/tokenEstimators.json src/modelPricing.json; then
115115
echo "No changes detected in model data files"
116-
echo "changed=false" >> $GITHUB_OUTPUT
116+
echo "changed=false" >> "$GITHUB_OUTPUT"
117117
else
118118
# Check if the only change is the lastUpdated date in modelPricing.json
119119
DIFF_OUTPUT=$(git diff src/modelPricing.json)
120120
121121
# Count the number of changed lines (lines starting with +/- but not +++ or ---)
122-
CHANGED_LINES=$(echo "$DIFF_OUTPUT" | grep -E '^[+-][^+-]' | wc -l)
122+
CHANGED_LINES=$(echo "$DIFF_OUTPUT" | grep -cE '^[+-][^+-]' || true)
123123
124124
# Check if only 2 lines changed (one deletion, one addition) and both contain "lastUpdated"
125125
if [ "$CHANGED_LINES" -eq 2 ]; then
126126
# Check if all changed lines contain "lastUpdated"
127-
if echo "$DIFF_OUTPUT" | grep -E '^[+-][^+-]' | grep -v '"lastUpdated"' | wc -l | grep -q '^0$'; then
127+
if ! echo "$DIFF_OUTPUT" | grep -E '^[+-][^+-]' | grep -qv '"lastUpdated"'; then
128128
# Verify no changes to tokenEstimators.json
129129
if git diff --quiet src/tokenEstimators.json; then
130130
echo "Only lastUpdated date changed - skipping PR creation"
131-
echo "changed=false" >> $GITHUB_OUTPUT
131+
echo "changed=false" >> "$GITHUB_OUTPUT"
132132
exit 0
133133
fi
134134
fi
135135
fi
136136
137137
echo "Changes detected in model data files"
138-
echo "changed=true" >> $GITHUB_OUTPUT
138+
echo "changed=true" >> "$GITHUB_OUTPUT"
139139
fi
140140
141141
- name: Create Pull Request

.github/workflows/check-toolnames.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
contents: read
1919
steps:
2020
- name: Harden the runner (Audit all outbound calls)
21-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
21+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2222
with:
2323
egress-policy: audit
2424

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Harden the runner (Audit all outbound calls)
23-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
23+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2424
with:
2525
egress-policy: audit
2626

@@ -81,7 +81,7 @@ jobs:
8181

8282
steps:
8383
- name: Harden the runner (Audit all outbound calls)
84-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
84+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
8585
with:
8686
egress-policy: audit
8787

.github/workflows/cli-build.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,51 @@ on:
1717
- 'src/toolNames.json'
1818
pull_request:
1919
branches: [main]
20-
paths:
21-
- 'cli/**'
22-
- 'src/sessionDiscovery.ts'
23-
- 'src/sessionParser.ts'
24-
- 'src/tokenEstimation.ts'
25-
- 'src/maturityScoring.ts'
26-
- 'src/usageAnalysis.ts'
27-
- 'src/opencode.ts'
28-
- 'src/types.ts'
29-
- 'src/tokenEstimators.json'
30-
- 'src/modelPricing.json'
31-
- 'src/toolNames.json'
3220

3321
permissions:
3422
contents: read
3523

3624
jobs:
25+
check-changes:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
cli-relevant: ${{ github.event_name == 'push' || steps.filter.outputs.cli-relevant == 'true' }}
29+
steps:
30+
- name: Harden Runner
31+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
32+
with:
33+
egress-policy: audit
34+
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
37+
- name: Check for CLI-relevant file changes
38+
if: github.event_name == 'pull_request'
39+
uses: dorny/paths-filter@de90cc6b5708d14e015ca8c3acee5b86b31db2a8 # v3.0.2
40+
id: filter
41+
with:
42+
filters: |
43+
cli-relevant:
44+
- 'cli/**'
45+
- 'src/sessionDiscovery.ts'
46+
- 'src/sessionParser.ts'
47+
- 'src/tokenEstimation.ts'
48+
- 'src/maturityScoring.ts'
49+
- 'src/usageAnalysis.ts'
50+
- 'src/opencode.ts'
51+
- 'src/types.ts'
52+
- 'src/tokenEstimators.json'
53+
- 'src/modelPricing.json'
54+
- 'src/toolNames.json'
55+
3756
build-and-validate:
57+
needs: check-changes
58+
if: needs.check-changes.outputs.cli-relevant == 'true'
3859
runs-on: ubuntu-latest
3960
env:
4061
node-version: 22
4162
steps:
4263
- name: Harden Runner
43-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
64+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
4465
with:
4566
egress-policy: audit
4667

.github/workflows/cli-publish.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
working-directory: cli
4141
steps:
4242
- name: Harden Runner
43-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
43+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
4444
with:
4545
egress-policy: audit
4646

@@ -100,14 +100,16 @@ jobs:
100100

101101
- name: Summary
102102
run: |
103-
echo "## CLI Package Published 📦" >> "$GITHUB_STEP_SUMMARY"
104-
echo "" >> "$GITHUB_STEP_SUMMARY"
105-
echo "- **Version:** v${{ steps.version.outputs.version }}" >> "$GITHUB_STEP_SUMMARY"
106-
echo "- **Bump:** ${{ inputs.version_bump }}" >> "$GITHUB_STEP_SUMMARY"
107-
echo "- **Dry run:** ${{ inputs.dry_run }}" >> "$GITHUB_STEP_SUMMARY"
108-
echo "" >> "$GITHUB_STEP_SUMMARY"
109-
if [ "${{ inputs.dry_run }}" = "false" ]; then
110-
echo "Install with: \`npx @rajbos/ai-engineering-fluency\`" >> "$GITHUB_STEP_SUMMARY"
111-
echo "" >> "$GITHUB_STEP_SUMMARY"
112-
echo "A PR has been opened to merge the version bump back to main." >> "$GITHUB_STEP_SUMMARY"
113-
fi
103+
{
104+
echo "## CLI Package Published 📦"
105+
echo ""
106+
echo "- **Version:** v${{ steps.version.outputs.version }}"
107+
echo "- **Bump:** ${{ inputs.version_bump }}"
108+
echo "- **Dry run:** ${{ inputs.dry_run }}"
109+
echo ""
110+
if [ "${{ inputs.dry_run }}" = "false" ]; then
111+
echo "Install with: \`npx @rajbos/ai-engineering-fluency\`"
112+
echo ""
113+
echo "A PR has been opened to merge the version bump back to main."
114+
fi
115+
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Harden the runner (Audit all outbound calls)
44-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
44+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
4545
with:
4646
egress-policy: audit
4747

@@ -50,7 +50,7 @@ jobs:
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
53+
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -60,7 +60,7 @@ jobs:
6060
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6161
# If this step fails, then you should remove it and run the build manually (see below)
6262
- name: Autobuild
63-
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
63+
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
6464

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

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
76+
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
7777
with:
7878
category: "/language:${{matrix.language}}"

.github/workflows/copilot-setup-steps.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# If you do not check out your code, Copilot will do this for you.
3232
steps:
3333
- name: Harden the runner (Audit all outbound calls)
34-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
34+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
3535
with:
3636
egress-policy: audit
3737

@@ -154,19 +154,19 @@ jobs:
154154
echo "Date range: $START_DATE to $END_DATE"
155155
156156
# Build command arguments
157-
ARGS="--storageAccount $AZURE_STORAGE_ACCOUNT"
158-
ARGS="$ARGS --tableName $AZURE_TABLE_NAME"
159-
ARGS="$ARGS --datasetId $AZURE_DATASET_ID"
160-
ARGS="$ARGS --startDate $START_DATE"
161-
ARGS="$ARGS --endDate $END_DATE"
162-
ARGS="$ARGS --output ./usage-data/usage-agg-daily.json"
157+
ARGS=(--storageAccount "$AZURE_STORAGE_ACCOUNT")
158+
ARGS+=(--tableName "$AZURE_TABLE_NAME")
159+
ARGS+=(--datasetId "$AZURE_DATASET_ID")
160+
ARGS+=(--startDate "$START_DATE")
161+
ARGS+=(--endDate "$END_DATE")
162+
ARGS+=(--output ./usage-data/usage-agg-daily.json)
163163
164164
# Use shared key if available, otherwise rely on Entra ID (DefaultAzureCredential)
165165
if [ -n "$AZURE_STORAGE_KEY" ]; then
166-
ARGS="$ARGS --sharedKey $AZURE_STORAGE_KEY"
166+
ARGS+=(--sharedKey "$AZURE_STORAGE_KEY")
167167
fi
168168
169-
node .github/skills/azure-storage-loader/load-table-data.js $ARGS || {
169+
node .github/skills/azure-storage-loader/load-table-data.js "${ARGS[@]}" || {
170170
echo "⚠️ Failed to download aggregated usage data, continuing without it"
171171
exit 0
172172
}

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden the runner (Audit all outbound calls)
20-
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
20+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
2121
with:
2222
egress-policy: audit
2323

0 commit comments

Comments
 (0)