Skip to content

Commit

Permalink
chore: do not publish benchmark metrics from forks (#1064)
Browse files Browse the repository at this point in the history
Adds check to not publish the benchmark metrics from a fork.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0

Signed-off-by: Sumu <[email protected]>
  • Loading branch information
sumupitchayan authored Jun 10, 2024
1 parent 7c85a81 commit 2634156
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml

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

4 changes: 2 additions & 2 deletions projenrc/benchmark-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class BenchmarkTest {
},
{
name: 'Authenticate Via OIDC Role',
if: `github.ref == 'refs/heads/main'`,
if: `github.event.repository.fork == false && github.ref == 'refs/heads/main'`,
uses: 'aws-actions/configure-aws-credentials@v4',
with: {
'aws-region': 'us-east-1',
Expand All @@ -144,7 +144,7 @@ export class BenchmarkTest {
},
{
name: 'Publish Metrics',
if: `github.ref == 'refs/heads/main'`,
if: `github.event.repository.fork == false && github.ref == 'refs/heads/main'`,
run: [
'aws cloudwatch put-metric-data --metric-name TSC-average --namespace JsiiPerformance --value ${{ steps.output_summary.outputs.duration-tsc }}',
'aws cloudwatch put-metric-data --metric-name JSII-average --namespace JsiiPerformance --value ${{ steps.output_summary.outputs.duration-jsii }}',
Expand Down

0 comments on commit 2634156

Please sign in to comment.