Skip to content
Merged
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
12 changes: 5 additions & 7 deletions .github/workflows/datadog-synthetics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ on:
branches: [ "main" ]

jobs:
build:
e2e-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Run Synthetic tests within your GitHub workflow.
# For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci
- name: Run Datadog Synthetic tests
if: ${{ secrets.DD_API_KEY != '' && secrets.DD_APP_KEY != '' }}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Secrets in step-level if condition: valid but has fork-PR implications

The added if: ${{ secrets.DD_API_KEY != '' && secrets.DD_APP_KEY != '' }} is a valid GitHub Actions pattern — the secrets context is available in step if expressions. However, note that for pull_request events triggered from forks, secrets are not passed to the workflow (they resolve to empty strings). This means the Datadog Synthetic tests step will be silently skipped for all fork PRs. This is likely the intended behavior (and arguably a security improvement), but reviewers should be aware that fork-originated PRs will never run these e2e tests, so there's no gate on external contributions.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0
with:
api_key: ${{secrets.DD_API_KEY}}
app_key: ${{secrets.DD_APP_KEY}}
test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy


api_key: ${{ secrets.DD_API_KEY }}
app_key: ${{ secrets.DD_APP_KEY }}
test_search_query: 'tag:ci-required-e2e'