diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index e5481679c1..4b19b7dc81 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -50,9 +50,13 @@ jobs: extra_nix_config: | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= extra-substituters = https://cache.iog.io + # DO NOT MERGE!!! + # TODO: Update with the correct tagged release. + - uses: tweag/configure-bazel-remote-cache-auth@fix_output + with: + buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }} + bazelrc_path: .bazelrc.local - name: Configure - env: - BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} run: | # Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. # See https://github.com/tweag/rules_haskell/issues/1498 and https://github.com/tweag/rules_haskell/pull/1692. @@ -61,15 +65,9 @@ jobs: macOS) BUILD_CONFIG=ci-macos-nixpkgs;; Linux) BUILD_CONFIG=ci-linux-nixpkgs;; esac - if [ -z "$BUILDBUDDY_API_KEY" ]; then - cache_setting='--noremote_upload_local_results' - else - cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" - fi - cat >.bazelrc.local <>.bazelrc.local <> "$GITHUB_PATH" + # DO NOT MERGE!!! + # TODO: Update with the correct tagged release. + - uses: tweag/configure-bazel-remote-cache-auth@fix_output + with: + buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }} + bazelrc_path: .bazelrc.local - name: Configure - env: - BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} shell: bash run: | # Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. @@ -174,11 +176,6 @@ jobs: Windows,rules_haskell) BUILD_CONFIG=ci-windows-bindist-rules-haskell;; Windows,rules_haskell_tests) BUILD_CONFIG=ci-windows-bindist-rules-haskell-tests;; esac - if [ -z "$BUILDBUDDY_API_KEY" ]; then - cache_setting='--noremote_upload_local_results' - else - cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" - fi if [[ ${{ runner.os }} == Windows ]]; then output_root_setting="startup --output_user_root=C:/_bzl" # On windows, we use a separate remote cache for bzlmod, @@ -192,10 +189,9 @@ jobs: output_root_setting="" bzlmod_cache_silo_key="" fi - cat >.bazelrc.local <>.bazelrc.local <