@@ -45,24 +45,28 @@ inputs:
4545 Logical suite name, e.g. build-and-test, coverage, playwright, pr-smoke,
4646 e2e-prod, deploy-gate. The dashboard FACETs on this.
4747 required : true
48+ # NOTE: composite actions cannot read the `github` context in their own
49+ # expressions, so the caller MUST pass these from its `with:` block (e.g.
50+ # repo: ${{ github.repository }}). The defaults below only apply when a caller
51+ # omits them entirely.
4852 repo :
49- description : ' Repository (owner/name). Default ${{ github.repository }}.'
53+ description : ' Repository (owner/name). Caller passes ${{ github.repository }}.'
5054 required : false
5155 default : ' '
5256 workflow :
53- description : ' Workflow name. Default ${{ github.workflow }}.'
57+ description : ' Workflow name. Caller passes ${{ github.workflow }}.'
5458 required : false
5559 default : ' '
5660 branch :
57- description : ' Branch ref name. Default ${{ github.ref_name }}.'
61+ description : ' Branch ref name. Caller passes ${{ github.ref_name }}.'
5862 required : false
5963 default : ' '
6064 commit-sha :
61- description : ' Commit SHA under test. Default ${{ github.sha }}.'
65+ description : ' Commit SHA under test. Caller passes ${{ github.sha }}.'
6266 required : false
6367 default : ' '
6468 pr-number :
65- description : ' PR number (empty on push). Default ${{ github.event.pull_request.number }}.'
69+ description : ' PR number (empty on push). Caller passes ${{ github.event.pull_request.number }}.'
6670 required : false
6771 default : ' '
6872 duration-ms :
@@ -74,8 +78,15 @@ inputs:
7478 required : false
7579 default : ' '
7680 log-url :
77- description : >-
78- URL to the run logs for triage. Default the run's GitHub Actions URL.
81+ description : ' URL to the run logs for triage. Caller passes the run URL.'
82+ required : false
83+ default : ' '
84+ event-name :
85+ description : ' GitHub event name. Caller passes ${{ github.event_name }}.'
86+ required : false
87+ default : ' '
88+ actor :
89+ description : ' GitHub actor. Caller passes ${{ github.actor }}.'
7990 required : false
8091 default : ' '
8192
@@ -85,24 +96,27 @@ runs:
8596 - name : Emit CI result to New Relic (no-op without secret)
8697 shell : bash
8798 env :
88- # All untrusted/free-form values flow through env, never interpolated
89- # into the shell body — same injection-safe posture as ci.yml's
90- # dispatch-auth-contract-e2e job.
99+ # Composite actions may reference ONLY `inputs` (+ env/runner/steps) in
100+ # their expressions — `secrets`, `job`, and `github` are NOT available
101+ # here, so the CALLER resolves those and passes them as inputs. All
102+ # untrusted/free-form values flow through env, never interpolated into
103+ # the shell body (injection-safe — same posture as ci.yml's
104+ # dispatch-auth-contract-e2e job).
91105 NR_LICENSE_KEY : ${{ inputs.license-key }}
92106 NR_ACCOUNT_ID : ${{ inputs.account-id }}
93107 NR_REGION : ${{ inputs.nr-region }}
94108 EV_RESULT : ${{ inputs.result }}
95109 EV_SUITE : ${{ inputs.suite }}
96- EV_REPO : ${{ inputs.repo != '' && inputs.repo || github.repository }}
97- EV_WORKFLOW : ${{ inputs.workflow != '' && inputs.workflow || github.workflow }}
98- EV_BRANCH : ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
99- EV_COMMIT : ${{ inputs.commit-sha != '' && inputs.commit-sha || github.sha }}
110+ EV_REPO : ${{ inputs.repo }}
111+ EV_WORKFLOW : ${{ inputs.workflow }}
112+ EV_BRANCH : ${{ inputs.branch }}
113+ EV_COMMIT : ${{ inputs.commit-sha }}
100114 EV_PR : ${{ inputs.pr-number }}
101115 EV_DURATION_MS : ${{ inputs.duration-ms }}
102116 EV_FAILED_STEP : ${{ inputs.failed-step }}
103- EV_LOG_URL : ${{ inputs.log-url != '' && inputs.log-url || format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }}
104- EV_EVENT_NAME : ${{ github.event_name }}
105- EV_ACTOR : ${{ github .actor }}
117+ EV_LOG_URL : ${{ inputs.log-url }}
118+ EV_EVENT_NAME : ${{ inputs.event-name }}
119+ EV_ACTOR : ${{ inputs .actor }}
106120 run : |
107121 set -uo pipefail
108122
0 commit comments