Skip to content

Commit 6bb66cc

Browse files
authored
[CI] Don't remove label if running from fork (vortex-data#5882)
Removing a label requires `contents: write` permissions, which we don't want to grant to forks. Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 64fa898 commit 6bb66cc

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/bench-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
steps:
2929
# We remove the benchmark label first so that the workflow can be re-triggered.
3030
- uses: actions-ecosystem/action-remove-labels@v1
31+
if: ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }}
3132
with:
3233
labels: benchmark
34+
fail_on_error: true
3335

3436
bench:
3537
needs: label_trigger

.github/workflows/sql-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ permissions:
2121
jobs:
2222
label_trigger:
2323
runs-on: ubuntu-latest
24-
timeout-minutes: 120
24+
timeout-minutes: 2
2525
if: ${{ contains(github.event.head_commit.message, '[benchmark-sql]') || github.event.label.name == 'benchmark-sql' && github.event_name == 'pull_request' }}
2626
steps:
2727
# We remove the benchmark label first so that the workflow can be re-triggered.
2828
- uses: actions-ecosystem/action-remove-labels@v1
29+
if: ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }}
2930
with:
3031
labels: benchmark-sql
32+
fail_on_error: true
3133

3234
sql:
3335
needs: label_trigger

0 commit comments

Comments
 (0)