Skip to content

Commit a7d5eb4

Browse files
authored
add bazel-flags field to inputs in action.yml (#65)
1 parent 7ce4371 commit a7d5eb4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

bash/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
command:
2323
required: true
2424
description: A command to run in the docker image
25+
bazel-flags:
26+
required: false
27+
description: Bazel flags to use for staleness regen
28+
type: string
2529

2630
runs:
2731
using: 'composite'
@@ -42,6 +46,8 @@ runs:
4246
credentials: ${{ inputs.credentials }}
4347
bazel-cache: regenerate-stale-files
4448
bash: ./regenerate_stale_files.sh $BAZEL_FLAGS
49+
bazel-flags: ${{ inputs.bazel-flags }}
50+
version: ${{ inputs.bazel-version }}
4551

4652
- name: Run
4753
shell: bash

bazel/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ inputs:
4545
required: false
4646
description: "Bazel target patterns to exclude. Each pattern must be prefixed with a minus sign."
4747
type: string
48+
bazel-flags:
49+
required: false
50+
description: Additional bazel flags to use
51+
type: string
4852

4953
runs:
5054
using: 'composite'
@@ -114,6 +118,11 @@ runs:
114118
shell: bash
115119
run: echo "BAZEL_FLAGS=$BAZEL_FLAGS --repository_cache=$(pwd)/${{ env.REPOSITORY_CACHE_PATH }}" >> $GITHUB_ENV
116120

121+
# TODO(b/467211650) this shouldn't be necessary, remove it
122+
- name: Append additional flags
123+
shell: bash
124+
run: echo "BAZEL_FLAGS=$BAZEL_FLAGS ${{ inputs.bazel-flags }}" >> $GITHUB_ENV
125+
117126
- name: Validate inputs
118127
if: ${{ (inputs.bash && inputs.bazel) || (!inputs.bash && !inputs.bazel) }}
119128
shell: bash

0 commit comments

Comments
 (0)