From 3fa045f1334b006b94f98d14e96487a383e954ba Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Fri, 25 Oct 2024 19:03:58 +0200 Subject: [PATCH] fix(IDX): define RUN_ON_DIFF_ONLY on the workflow level (#2266) This fixes a bug introduced in https://github.com/dfinity/ic/pull/2245. It defines the `RUN_ON_DIFF_ONLY ` env var on the workflow level such that the `Set BAZEL_EXTRA_ARGS` step has access to it. --------- Co-authored-by: IDX GitHub Automation --- .github/workflows-source/ci-main.yml | 3 +-- .github/workflows/ci-main.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows-source/ci-main.yml b/.github/workflows-source/ci-main.yml index 8ebe71e5902..5124ec1f161 100644 --- a/.github/workflows-source/ci-main.yml +++ b/.github/workflows-source/ci-main.yml @@ -31,6 +31,7 @@ env: CI_RUN_ID: ${{ github.run_id }} RUSTFLAGS: "--remap-path-prefix=${CI_PROJECT_DIR}=/ic" BUILDEVENT_DATASET: "github-ci-dfinity" + RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} anchors: image: &image @@ -153,7 +154,6 @@ jobs: env: AWS_SHARED_CREDENTIALS_CONTENT: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }} # Only run ci/bazel-scripts/diff.sh on PRs that are not labeled with "CI_ALL_BAZEL_TARGETS". - RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} OVERRIDE_DIDC_CHECK: ${{ contains(github.event.pull_request.labels.*.name, 'CI_OVERRIDE_DIDC_CHECK') }} with: BAZEL_COMMAND: "test" @@ -290,7 +290,6 @@ jobs: rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}" env: BAZEL_COMMAND: "build" - RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }} BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} BRANCH_HEAD_SHA: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 6da9713634c..4d27ddb1917 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -28,6 +28,7 @@ env: CI_RUN_ID: ${{ github.run_id }} RUSTFLAGS: "--remap-path-prefix=${CI_PROJECT_DIR}=/ic" BUILDEVENT_DATASET: "github-ci-dfinity" + RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} jobs: bazel-test-all: name: Bazel Test All @@ -99,7 +100,6 @@ jobs: env: AWS_SHARED_CREDENTIALS_CONTENT: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }} # Only run ci/bazel-scripts/diff.sh on PRs that are not labeled with "CI_ALL_BAZEL_TARGETS". - RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} OVERRIDE_DIDC_CHECK: ${{ contains(github.event.pull_request.labels.*.name, 'CI_OVERRIDE_DIDC_CHECK') }} with: BAZEL_COMMAND: "test" @@ -377,7 +377,6 @@ jobs: rm -rf "/cache/job/${CI_JOB_NAME}/${CI_RUN_ID}" env: BAZEL_COMMAND: "build" - RUN_ON_DIFF_ONLY: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'CI_ALL_BAZEL_TARGETS') }} MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }} BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} BRANCH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}