/.github/{scripts,workflows}: use the issue-number arg in comment benchmarking job

This commit is contained in:
Dustin Brown
2021-08-17 16:40:11 -07:00
parent 0109124b16
commit 5a4a7026b6
5 changed files with 19 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ jobs:
report-pull-request:
name: Report Performance Benchmarks on Pull Request
runs-on: ubuntu-18.04
if: ${{ github.event.client_payload.issue_number != "" }}
if: ${{ github.event.client_payload.issue_number != "-1" }}
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -49,7 +49,7 @@ jobs:
report-email:
name: Report Performance Benchmarks via Email
runs-on: ubuntu-18.04
if: ${{ github.event.client_payload.issue_number == "" }}
if: ${{ github.event.client_payload.issue_number == "-1" }}
steps:
- name: Checkout
uses: actions/checkout@v2

View File

@@ -73,6 +73,12 @@ jobs:
KUBECONFIG=kubeconfig kubectl config use-context github-actions-dolt-context
env:
CONFIG: ${{ secrets.CORP_KUBECONFIG }}
- name: Get pull number
uses: actions/github-script@v3
id: get_pull_number
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: core.setOutput("pull_number", JSON.stringify(context.issue.number));
- name: Run benchmarks
id: run-benchmarks
run: ./.github/scripts/performance-benchmarking/run-benchmarks.sh
@@ -82,6 +88,7 @@ jobs:
TO_SERVER: 'dolt'
TO_VERSION: ${{ steps.comment-branch.outputs.head_sha }}
MODE: 'pullRequest'
ISSUE_NUMBER: ${{ steps.get_pull_number.outputs.pull_number }}
ACTOR: ${{ github.actor }}
KUBECONFIG: "./kubeconfig"
TEMPLATE_SCRIPT: "./.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh"