Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/approved_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Send PR Approval Status

permissions:
contents: read

on:
pull_request:
branches:
- main
types: ["review_requested", "synchronize", "opened", "reopened"]
pull_request_review:
types:
- submitted
- dismissed

jobs:
send_status:
runs-on: ubuntu-latest
if: >
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository &&
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') &&
startsWith(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
permissions:
id-token: write
steps:
- name: Get GitHub token
id: get_token
uses: DataDog/dd-octo-sts-action@c85802a58e202b7e764b5441e4378c76043c8108 # v1.0.5
with:
scope: DataDog/datadog-api-spec
policy: pup.approved_status.post-review-status
- name: Post PR review status check
uses: DataDog/github-actions/post-review-status@65b4875f33ad773d7ba4b005a2cb5f35020295f3 # v2.3.0
with:
github-token: ${{ steps.get_token.outputs.token }}
repo: datadog-api-spec
context: pup/main
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,30 @@ jobs:
ls -lh target/wasm32-wasip2/release/pup.wasm
echo "Browser WASM:"
ls -lh pkg/pup_wasm_bg.wasm

report:
name: Report status to datadog-api-spec
runs-on: ubuntu-latest
if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
needs:
- check-test-coverage
- cross-compile-linux
- cross-compile-macos
- cross-compile-windows
- wasm
permissions:
id-token: write
steps:
- uses: DataDog/dd-octo-sts-action@c85802a58e202b7e764b5441e4378c76043c8108 # v1.0.5
id: octo-sts
with:
scope: DataDog/datadog-api-spec
policy: pup.ci.post-status-check
- name: Post status check
uses: DataDog/github-actions/post-status-check@65b4875f33ad773d7ba4b005a2cb5f35020295f3 # v2.3.0
with:
github-token: ${{ steps.octo-sts.outputs.token }}
repo: datadog-api-spec
# A cancelled run was superseded by a newer push to the generated branch.
status: ${{ contains(needs.*.result, 'cancelled') && 'pending' || (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped')) && 'failure' || 'success' }}
context: main/unit
Loading