Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions .github/actions/setup-bazel/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Setup Bazel"
description: "Configure Bazel with caching for GitHub Actions workflows"

runs:
using: "composite"
steps:
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
# Files hashed to compute the repository cache key. If only `true` is
# passed, only MODULE.bazel/WORKSPACE* are hashed, so lockfile-only
# updates would get a cache hit on the old key and skip saving newly
# downloaded wheels.
repository-cache: |
- MODULE.bazel
- dev/requirements.txt
- dev/uv.lock
- tools/publish/requirements_linux.txt
bazelrc: |
# .bazelrc enables --config=pyrefly by default; disable the pyrefly
# output group here so operational workflows don't download the
# pyrefly toolchain or type-check targets before running them.
build --output_groups=-pyrefly
build --//python/config_settings:py_pbs_distribution=install_only_stripped
4 changes: 1 addition & 3 deletions .github/workflows/backport_create_releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/backport_prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/on_pr_closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
uses: actions/checkout@v7
with:
ref: ${{ inputs.tag_name || github.ref_name }}
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- env:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_add_backports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Add Backports to Tracking Issue
env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_complete_prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Mark Prepare Release Complete
id: complete_prepare
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_create_rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_create_release_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_process_backports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_sync_changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_sync_changelog_complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
fetch-depth: 0

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
uses: ./.github/actions/setup-bazel

- name: Configure Git Identity
run: |
Expand Down
Loading