File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and deploy tools
2
+ run-name : Build and deploy tools
3
+ on : [push]
4
+ jobs :
5
+ build-deploy-tools :
6
+ runs-on : ubuntu-latest
7
+ permissions :
8
+ pull-requests : read
9
+ steps :
10
+ - name : Checkout the code
11
+ uses : actions/checkout@v4
12
+ - name : Get changed files
13
+ id : changed-files
14
+ uses : tj-actions/changed-files@v39
15
+ - name : Refresh prebuilts if transitive deps changed
16
+ id : refresh-prebuilts
17
+ run : |
18
+ for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
19
+ echo "$file was changed"
20
+ label=$(bazel query "$file" || true)
21
+ if [[ ! -z $label ]]; then
22
+ bazel query "kind(java_binary, rdeps(//private/tools/java/..., $label))" >> /tmp/affected_targets.txt
23
+ fi
24
+ done
25
+ affected_targets_count=$(wc -l < /tmp/affected_targets.txt)
26
+ if [[ $affected_targets_count -gt 0 ]]; then
27
+ bazelisk build //scripts:refresh-prebuilts
28
+ fi
29
+ - name : Upload prebuilts # TODO: Can this be a Create Pull Request action instead?
30
+ if : steps.refresh-prebuilts.outcome == 'success'
31
+ uses : actions/upload-artifact@v3
32
+ with :
33
+ name : deploy jars
34
+ path : bazel-bin/private/tools/java/com/github/bazelbuild/rules_jvm_external/**/*_deploy.jar
35
+ retention-days : 5
You can’t perform that action at this time.
0 commit comments