From e6da13aeaa564ddf44d583f53c1fe5d15511c48c Mon Sep 17 00:00:00 2001 From: Peter Krenesky Date: Thu, 22 Oct 2026 09:14:01 -0700 Subject: [PATCH] Add Rust language boundary caller --- .github/workflows/language-boundary.yml | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/language-boundary.yml diff --git a/.github/workflows/language-boundary.yml b/.github/workflows/language-boundary.yml new file mode 100644 index 0000000..14f4a21 --- /dev/null +++ b/.github/workflows/language-boundary.yml @@ -0,0 +1,49 @@ +name: Language boundary + +on: + pull_request_target: + +permissions: + contents: read + +jobs: + guard: + uses: agent-ix/engineering-assurance/.github/workflows/language-boundary-reusable.yml@73a95925dbeb00b64c45e0ce13fe3a7932529834 + with: + repository: ${{ github.repository }} + pull_number: ${{ github.event.pull_request.number }} + base_sha: ${{ github.event.pull_request.base.sha }} + head_sha: ${{ github.event.pull_request.head.sha }} + + publish-status: + needs: guard + if: ${{ always() }} + runs-on: ubuntu-latest + permissions: + statuses: write + steps: + - name: Report language boundary on the PR head + env: + GH_TOKEN: ${{ github.token }} + REPOSITORY: ${{ github.repository }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + GUARD_RESULT: ${{ needs.guard.result }} + run: | + if [ "$GUARD_RESULT" = success ]; then + state=success + description='Rust language boundary passed' + else + state=failure + description='Rust language boundary failed' + fi + + gh api -X POST "repos/${REPOSITORY}/statuses/${HEAD_SHA}" \ + -f state="$state" \ + -f context=language-boundary \ + -f target_url="$RUN_URL" \ + -f description="$description" + + if [ "$state" = failure ]; then + exit 1 + fi