vertexai: add google_vertex_ai_semantic_governance_policy_engine (beta) #17758
This file contains hidden or 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: magician-commands | |
| permissions: read-all | |
| on: | |
| issue_comment: | |
| types: | |
| - created | |
| jobs: | |
| handle-comment-command: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| pull-requests: write | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Check for magician invocation | |
| id: read-comment | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| run: | | |
| if [[ "$COMMENT_BODY" =~ .*@modular-magician\ .* ]]; then | |
| echo "match=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "match=" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Checkout Repository | |
| if: steps.read-comment.outputs.match != '' | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| ref: main | |
| - name: Set up Go | |
| if: steps.read-comment.outputs.match != '' | |
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: '^1.26' | |
| cache-dependency-path: | | |
| .ci/magician/go.mod | |
| - name: Build magician | |
| if: steps.read-comment.outputs.match != '' | |
| run: | | |
| cd .ci/magician | |
| go build . | |
| - name: Run Magician Command Parser | |
| if: steps.read-comment.outputs.match != '' | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| run: | | |
| # Execute the parse-comment subcommand | |
| # The comment body is passed via the COMMENT_BODY environment variable | |
| .ci/magician/magician parse-comment \ | |
| ${{ github.event.issue.number }} \ | |
| ${{ github.event.comment.user.login }} |