Skip to content

Commit

Permalink
write to github output in node script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Aug 23, 2024
1 parent 4fd1695 commit b6ed714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ jobs:
id: step_sentry_trace
run: |
node ./scripts/stryker/start-trace.mjs
echo 'sentry_trace=${{ env.SENTRY_MUT_SENTRY_TRACE }}'
echo 'baggage=${{ env.SENTRY_MUT_BAGGAGE }}'
echo 'sentry_trace=${{ env.SENTRY_MUT_SENTRY_TRACE }}' >> $GITHUB_OUTPUT
echo 'baggage=${{ env.SENTRY_MUT_BAGGAGE }}' >> $GITHUB_OUTPUT
echo output=${{ env.GITHUB_OUTPUT }}
outputs:
dependency_cache_key: ${{ steps.install_dependencies.outputs.cache_key }}
Expand Down
3 changes: 3 additions & 0 deletions scripts/stryker/start-trace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const baggage = `sentry-trace_id=${traceId}`;
process.env.SENTRY_MUT_SENTRY_TRACE = sentryTrace;
process.env.SENTRY_MUT_BAGGAGE = baggage;

fs.appendFileSync(process.env.GITHUB_OUTPUT, `sentry_trace=${sentryTrace}\n`);
fs.appendFileSync(process.env.GITHUB_OUTPUT, `baggage=${baggage}\n`);

console.log('Starting Trace with:');
console.log(`- sentry-trace: ${sentryTrace}`);
console.log(`- baggage: ${baggage}`);
Expand Down

0 comments on commit b6ed714

Please sign in to comment.