Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,18 @@ env:
jobs:
get_config:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
if: >
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event.action == 'closed' ||
contains(github.event.pull_request.labels.*.name, 'ok-to-test')
contains(github.event.pull_request.labels.*.name, 'ok-to-test') ||
github.event.pull_request.head.repo.full_name == github.repository ||
github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'COLLABORATOR' ||
github.event.pull_request.author_association == 'MEMBER'
outputs:
rocm_version: ${{ steps.read_config.outputs.rocm_version }}
utils_repo: ${{ steps.read_config.outputs.utils_repo }}
Expand All @@ -85,6 +92,20 @@ jobs:
perf_workspace: ${{ steps.read_config.outputs.perf_workspace }}
runner_label: ${{ steps.read_config.outputs.runner_label }}
steps:
- name: Remove ok-to-test label on new commits from forked PRs by external contributors
if: >
github.event.action == 'synchronize' &&
contains(github.event.pull_request.labels.*.name, 'ok-to-test') &&
github.event.pull_request.head.repo.full_name != github.repository &&
github.event.pull_request.author_association != 'OWNER' &&
github.event.pull_request.author_association != 'COLLABORATOR' &&
github.event.pull_request.author_association != 'MEMBER'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "ok-to-test" --repo ${{ github.repository }} || true
echo "::error::New commits pushed, 'ok-to-test' label removed. Please review the changes and add the label back if tests should be run."
exit 1
- name: checkout
uses: actions/checkout@v4
- name: read_config
Expand Down Expand Up @@ -148,4 +169,4 @@ jobs:
perf_workspace: ${{ github.event.inputs.perf_workspace || needs.get_config.outputs.perf_workspace }}
runs_on: ${{ github.event.inputs.runner_label || needs.get_config.outputs.runner_label }}
secrets:
BENCHMARK_UTILS_READ_TOKEN: ${{ secrets.BENCHMARK_UTILS_READ_TOKEN }}
BENCHMARK_UTILS_READ_TOKEN: ${{ secrets.BENCHMARK_UTILS_READ_TOKEN }}
Loading