Collect client IP tags for AI Guard requests #3111
Workflow file for this run
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: Enforce Datadog Merge Queue | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, enqueued] | |
| branches: | |
| - master | |
| merge_group: | |
| jobs: | |
| enforce_datadog_merge_queue: | |
| name: Merge queue check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required for OIDC token federation | |
| steps: | |
| - name: Block GitHub merge queue | |
| if: github.event_name == 'merge_group' | |
| run: | | |
| echo "Merge is handled by the Datadog merge queue system. Use the /merge command to enqueue your PR for merging." | |
| exit 1 | |
| - name: Get OIDC token | |
| if: github.event.action == 'enqueued' | |
| uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/dd-trace-java | |
| policy: self.enforce-datadog-merge-queue.comment-pr | |
| - name: Post /merge comment | |
| if: github.event.action == 'enqueued' | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 9.0.0 | |
| with: | |
| github-token: ${{ steps.octo-sts.outputs.token }} | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: '/merge' | |
| }); |