Skip to content

Commit

Permalink
Merge pull request #809 from edoardopirovano/include-run-id
Browse files Browse the repository at this point in the history
Include matrix information in debug artifact name
  • Loading branch information
aeisenberg committed Nov 4, 2021
2 parents 0442e71 + 375c147 commit ea16943
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/__debug-artifacts.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-checks/checks/debug-artifacts.yml
Expand Up @@ -13,7 +13,7 @@ steps:
id: analysis
- uses: actions/download-artifact@v2
with:
name: debug-artifacts
name: debug-artifacts-${{ matrix.os }}-${{ matrix.version }}
- shell: bash
run: |
LANGUAGES="cpp csharp go java javascript python"
Expand Down
8 changes: 7 additions & 1 deletion src/analyze-action.ts
Expand Up @@ -237,8 +237,14 @@ async function run() {
}

async function uploadDebugArtifacts(toUpload: string[], rootDir: string) {
let suffix = "";
const matrix = actionsUtil.getRequiredInput("matrix");
if (matrix !== undefined && matrix !== "null") {
for (const entry of Object.entries(JSON.parse(matrix)).sort())
suffix += `-${entry[1]}`;
}
await artifact.create().uploadArtifact(
DEBUG_ARTIFACT_NAME,
`${DEBUG_ARTIFACT_NAME}${suffix}`,
toUpload.map((file) => path.normalize(file)),
path.normalize(rootDir)
);
Expand Down

0 comments on commit ea16943

Please sign in to comment.