Skip to content

Commit 610f41e

Browse files
committed
GitHub Actions test
1 parent 99ca15d commit 610f41e

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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: Check out repository 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 affected files changed
16+
run: |
17+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
18+
echo "$file was changed"
19+
label=$(bazel query "$file" || true)
20+
if [[ ! -z $label ]]; then
21+
bazel query "kind(java_binary, rdeps(//private/tools/java/..., $label))" >> /tmp/affected_targets
22+
fi
23+
done
24+
affected_targets=$(wc -l /tmp/affected_targets)
25+
if [[ $affected_targets -gt 0 ]]; then
26+
bazelisk run //scripts:refresh-prebuilts
27+
fi
28+
- name: Upload Artifact
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: outdated_deploy.jar
32+
path: bazel-bin/private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/outdated_deploy.jar
33+
retention-days: 5

private/tools/java/com/github/bazelbuild/rules_jvm_external/Coordinates.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public Coordinates(String coordinates) {
2828
groupId = Objects.requireNonNull(parts[0]);
2929
artifactId = Objects.requireNonNull(parts[1]);
3030

31+
3132
if (parts.length == 2) {
3233
extension = "jar";
3334
classifier = "";

0 commit comments

Comments
 (0)