Skip to content

Commit

Permalink
Don't publish benchmark results from non-main branches
Browse files Browse the repository at this point in the history
Signed-off-by: James Bornholt <bornholt@amazon.com>
  • Loading branch information
jamesbornholt committed Mar 13, 2024
1 parent b74b6b4 commit e46cf4a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string
Expand Down Expand Up @@ -62,7 +65,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand Down Expand Up @@ -108,7 +111,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand Down Expand Up @@ -156,6 +159,6 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20
2 changes: 2 additions & 0 deletions .github/workflows/bench_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
uses: ./.github/workflows/bench.yml
with:
ref: ${{ github.event.after }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
s3express-integration:
name: Benchmarks (s3express)
uses: ./.github/workflows/bench_s3express.yml
with:
ref: ${{ github.event.after }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
7 changes: 5 additions & 2 deletions .github/workflows/bench_s3express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string
Expand Down Expand Up @@ -63,7 +66,7 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

Expand Down Expand Up @@ -109,6 +112,6 @@ jobs:
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.environment && 'false' || 'true' }}
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

0 comments on commit e46cf4a

Please sign in to comment.