Skip to content

Commit 66ee232

Browse files
committed
small fixes
1 parent 802be89 commit 66ee232

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

.github/workflows/community-prs-ok-to-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Community PRs Approved to Run Workflows
1+
name: Community PRs Approved to Run Workflows
22

33
on:
44
pull_request_target:
@@ -15,7 +15,7 @@ jobs:
1515
1616
environment: external-prs # approval gate; no env secrets needed
1717

18-
uses: ./github/workflows/pr-playwright-tests.yml
18+
uses: ./.github/workflows/pr-playwright-tests.yml
1919
with:
2020
pr_repo: ${{ github.event.pull_request.head.repo.full_name }}
2121
pr_sha: ${{ github.event.pull_request.head.sha }}

.github/workflows/pr-playwright-tests.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Run Playwright Tests
22

33
on:
4-
push: # Internal runs
5-
workflow_call: # Allows a caller to run this against a fork/community PR
4+
push: # keeps existing internal runs
5+
workflow_call: # allows a caller to run this against a fork PR
66
inputs:
77
pr_repo:
88
type: string
@@ -18,34 +18,39 @@ on:
1818
required: false
1919
default: '["runs-on","runner=32cpu-linux-x64","disk=large","run-id=${{ github.run_id }}"]'
2020

21+
permissions:
22+
contents: read
23+
2124
concurrency:
22-
group: Run-Playwright-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }}
25+
group: Run-Playwright-Tests-${{ github.workflow }}-${{ inputs.pr_sha || github.head_ref || (github.event_name == 'workflow_run' && github.event.workflow_run.head_branch) || github.ref_name || github.run_id }}
2326
cancel-in-progress: true
24-
27+
2528
env:
26-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
27-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
28-
GEN_AI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2929
MOCK_LLM_RESPONSE: true
3030
PYTEST_PLAYWRIGHT_SKIP_INITIAL_RESET: true
3131

3232
jobs:
3333
playwright-tests:
3434
name: Playwright Tests
35+
runs-on: ${{ inputs.runner }}
36+
37+
# Secrets come from the caller (via `secrets: inherit`)
38+
env:
39+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
40+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
41+
GEN_AI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
42+
# Vars (non-secret) pulled from repo/org vars:
43+
RUNS_ON_AWS_REGION: ${{ vars.RUNS_ON_AWS_REGION }}
44+
RUNS_ON_S3_BUCKET_CACHE: ${{ vars.RUNS_ON_S3_BUCKET_CACHE }}
3545

36-
# See https://runs-on.com/runners/linux/
37-
runs-on:
38-
[
39-
runs-on,
40-
runner=32cpu-linux-x64,
41-
disk=large,
42-
"run-id=${{ github.run_id }}",
43-
]
4446
steps:
4547
- name: Checkout code
4648
uses: actions/checkout@v4
4749
with:
50+
repository: ${{ inputs.pr_repo }}
51+
ref: ${{ inputs.pr_sha }}
4852
fetch-depth: 0
53+
persist-credentials: false
4954

5055
- name: Set up Python
5156
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)