Skip to content

Commit

Permalink
GitHub Actions test
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Oct 25, 2023
1 parent 99ca15d commit 6881aad
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/prebuilts-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and deploy tools
run-name: Build and deploy tools
on: [push]
jobs:
build-deploy-tools:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
- name: Refresh prebuilts if transitive deps changed
id: refresh-prebuilts
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
label=$(bazel query "$file" || true)
if [[ ! -z $label ]]; then
bazel query "kind(java_binary, rdeps(//private/tools/java/..., $label))" >> /tmp/affected_targets.txt
fi
done
affected_targets_count=$(wc -l < /tmp/affected_targets.txt)
if [[ $affected_targets_count -gt 0 ]]; then
bazelisk build //scripts:refresh-prebuilts
fi
- name: Upload prebuilts # TODO: Can this be a Create Pull Request action instead?
if: steps.refresh-prebuilts.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: deploy jars
path: bazel-bin/private/tools/java/com/github/bazelbuild/rules_jvm_external/**/*_deploy.jar
retention-days: 5
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Coordinates(String coordinates) {
groupId = Objects.requireNonNull(parts[0]);
artifactId = Objects.requireNonNull(parts[1]);


if (parts.length == 2) {
extension = "jar";
classifier = "";
Expand Down

0 comments on commit 6881aad

Please sign in to comment.