Skip to content

Commit 05731b5

Browse files
authored
chore: slugify artifact ID (#614)
In #613 we made the artifact ID unique for different Node versions, but the characters in `lts/*` aren't all safe for inclusion in the artifact ID. Slugify the artifact ID first before using it. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 11579fd commit 05731b5

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/integ.yml

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projenrc/cdk-cli-integ-tests.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,25 @@ export class CdkCliIntegTestsWorkflow extends Component {
455455
'fi',
456456
].join('\n'),
457457
},
458+
// Slugify artifact ID, because matrix.node will contain invalid chars
459+
{
460+
name: 'Slugify artifact id',
461+
id: 'artifactid',
462+
run: [
463+
'slug=$(node -p \'process.env.INPUT.replace(/[^a-z0-9._-]/gi, "-")\')',
464+
'echo "slug=$slug" >> "$GITHUB_OUTPUT"',
465+
].join('\n'),
466+
env: {
467+
INPUT: 'logs-${{ matrix.suite }}-${{ matrix.node }}',
468+
},
469+
},
458470
{
459471
name: 'Upload logs',
460472
if: 'always()',
461473
uses: 'actions/[email protected]',
462474
id: 'logupload',
463475
with: {
464-
name: 'logs-${{ matrix.suite }}-${{ matrix.node }}',
476+
name: '${{ steps.artifactid.outputs.slug }}',
465477
path: 'logs/',
466478
overwrite: 'true',
467479
},

0 commit comments

Comments
 (0)