From f3e4f44737e6e6e19c5d63210569a149d4b6570c Mon Sep 17 00:00:00 2001 From: Adam Farley Date: Thu, 30 Nov 2023 10:55:13 +0000 Subject: [PATCH] Make autotriage only run in pull requests This should prevent accidental triggering when someone fetches a commit containing a change to these files and pushes it to their fork. Also moving a pwd envvar as its current location may cause problems in some forks. Signed-off-by: Adam Farley --- .github/workflows/build-autotriage.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-autotriage.yml b/.github/workflows/build-autotriage.yml index e010b3391..ae83d0ee5 100644 --- a/.github/workflows/build-autotriage.yml +++ b/.github/workflows/build-autotriage.yml @@ -6,14 +6,15 @@ name: "Build Autotriage" on: schedule: - cron: '0 0 * * MON' - push: + pull_request: + branches: [master] paths: - '**build-autotriage.yml' - '**build_autotriage.sh' - '**autotriage_regexes.sh' - + env: - TRIAGE_SCRIPT: "${PWD}/tooling/build_autotriage/build_autotriage.sh" + TRIAGE_SCRIPT: "tooling/build_autotriage/build_autotriage.sh" jobs: Label: @@ -22,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: "Run Build Auto Triage" - run: bash "${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk22head + run: bash "${PWD}/${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk22head - name: Create Issue From File env: