Skip to content

chore(deps): update ghcr.io/pfnet-research/meta-fuse-csi-plugin/meta-… #107

chore(deps): update ghcr.io/pfnet-research/meta-fuse-csi-plugin/meta-…

chore(deps): update ghcr.io/pfnet-research/meta-fuse-csi-plugin/meta-… #107

Workflow file for this run

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} //images/...
- name: Build results
if: always()
uses: actions/github-script@v7
with:
script: |
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}
`;
if (context.eventName === 'pull_request') {
await github.rest.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body: body
});
};