chore(deps): update helm release buildbuddy to v0.0.290 #332
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bazel Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
# This job checks if an identical workflow is being triggered by different | |
# event and skips it. For instance there is no need to run the same pipeline | |
# twice for pull_request and push for identical commit sha. | |
pre_job: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
build: ${{ steps.filter.outputs.build }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: skip_check | |
uses: fkirc/[email protected] | |
with: | |
skip_after_successful_duplicate: 'true' | |
concurrent_skipping: same_content | |
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
build: | |
- ".github/workflows/build.yaml" | |
- ".bazelversion" | |
- ".bazelrc" | |
- "WORKSPACE" | |
- "**/BUILD" | |
- "**/BUILD.bazel" | |
- "**/*.bzl" | |
- "**/*.bazel" | |
- "bazel/**" | |
build: | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.build == 'true' }} | |
runs-on: pve-talos | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bazel Build | |
run: | | |
INVOCATION="$(cat /proc/sys/kernel/random/uuid)" | |
echo "INVOCATION=${INVOCATION}" >> $GITHUB_ENV | |
bazel build \ | |
--config=remote-exec \ | |
--invocation_id=${INVOCATION} \ | |
--build_tag_filters="-age-secret" \ | |
//... | |
- name: Build results | |
if: always() | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
if (context.eventName != 'pull_request') { | |
process.exit(0); | |
}; | |
const invocation_uuid = process.env.INVOCATION; | |
const payload = { | |
'lookup': { | |
'invocation_id': invocation_uuid | |
} | |
}; | |
const response = await fetch('https://buildbuddy.szamszur.cloud/rpc/BuildBuddyService/GetInvocation', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
body: JSON.stringify(payload) | |
}); | |
const bepData = await response.json(); | |
const targets_count = bepData.invocation[0]?.targetConfiguredCount ?? undefined; | |
const actions_count = bepData.invocation[0]?.actionCount ?? undefined; | |
const elapsed_time = (bepData.invocation[0]?.durationUsec ?? undefined) / 1000000; | |
const bazel_command = bepData.invocation[0]?.command ?? undefined; | |
const success = '${{ job.status }}' === 'success'; | |
const body = ` | |
## 🛠️ Build Info | |
Status: ${success ? '✅' : '❌'} | |
Commit SHA: ${context.payload.pull_request.head.sha} | |
Targets: ${targets_count} | |
Actions: ${actions_count} | |
Command: ${bazel_command} | |
Elapsed Time: ${elapsed_time}s | |
Invocation: https://buildbuddy.szamszur.cloud/invocation/${invocation_uuid} | |
`; | |
await github.rest.issues.createComment({ | |
...context.repo, | |
issue_number: context.payload.pull_request.number, | |
body: body | |
}); |