Skip to content

Commit

Permalink
Guard metrics upload and report generation for fork PRs (#10080)
Browse files Browse the repository at this point in the history
Summary:
I noticed in #9903 that the upload errors due to missing credentials. This PR adds a guard that allows the job to finish ✔️ even from a fork. It will still run the upload (for testing) when the PR is from within the main repo.

Pull Request resolved: #10080

Reviewed By: bikramSingh91

Differential Revision: D58244591

Pulled By: kevinwilfong

fbshipit-source-id: e75bf84292ad046dfc85be9f1a3b813af474cf11
  • Loading branch information
assignUser authored and facebook-github-bot committed Jun 7, 2024
1 parent 20470a0 commit ff07cb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
python3 -m pip install -r scripts/benchmark-requirements.txt
- name: "Upload Metrics"
# This disables the upload and report generation on fork PRs but allows it for forks from within the main repo.
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'facebookincubator/velox' }}
env:
CONBENCH_URL: "https://velox-conbench.voltrondata.run/"
CONBENCH_MACHINE_INFO_NAME: "GitHub-runner-${{ matrix.runner }}"
Expand All @@ -118,6 +120,7 @@ jobs:
"/tmp/metrics"
upload-report:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'facebookincubator/velox' }}
permissions:
contents: write
runs-on: ubuntu-latest
Expand Down

0 comments on commit ff07cb0

Please sign in to comment.