Skip to content

Commit 5b7a1d1

Browse files
authored
feat: add support for specifying the working directory in the artifact-size-metrics action (#108)
1 parent 60f21d6 commit 5b7a1d1

File tree

1 file changed

+10
-1
lines changed
  • .github/actions/artifact-size-metrics/show-results

1 file changed

+10
-1
lines changed

.github/actions/artifact-size-metrics/show-results/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
name: Artifact Size Metrics - Show Results
22
description: Posts a new artifact analysis comment on the PR
3-
3+
inputs:
4+
working-directory:
5+
required: false
6+
description: The working directory to use for reading the previously-generated report.
7+
default: ''
48
runs:
59
using: "composite"
610
steps:
711
- name: Post Artifact Analysis Comment
812
uses: actions/github-script@v7
913
with:
1014
script: |
15+
const workingDirectory = '${{ inputs.working-directory }}'
16+
if (workingDirectory) {
17+
process.chdir(workingDirectory)
18+
}
19+
1120
const fs = require('node:fs')
1221
const prNumber = context.issue.number ?? process.env.SDK_PR
1322

0 commit comments

Comments
 (0)