File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,23 @@ jobs:
8484 if : ${{ needs.check-all.outputs.should_run == 'true' }}
8585 outputs :
8686 can_access_secrets : ${{ steps.secret_access_check.outputs.can_access_secrets }}
87- env :
88- DATADOG_CI_APP_ID : ${{ secrets.GH_APP_DATADOG_VECTOR_CI_APP_ID }}
8987 steps :
9088 - uses : actions/checkout@v4
89+
90+ - name : Determine if secrets are defined (PR author is team member)
91+ id : secret_access_check
92+ if : github.event_name == 'pull_request'
93+ env :
94+ GH_APP_DATADOG_VECTOR_CI_APP_ID : ${{ secrets.GH_APP_DATADOG_VECTOR_CI_APP_ID }}
95+ run : |
96+ if [[ "$GH_APP_DATADOG_VECTOR_CI_APP_ID" != "" ]] ; then
97+ echo "can_access_secrets=true" >> $GITHUB_OUTPUT
98+ else
99+ echo "can_access_secrets=false" >> $GITHUB_OUTPUT
100+ fi
101+
91102 - name : Run setup steps required by the IT suite
92- if : ${{ github.event_name == 'merge_group' || env.DATADOG_CI_APP_ID }}
103+ if : ${{ github.event_name == 'merge_group' || steps.check.outputs.can_access_secrets == 'true' }}
93104 run : |
94105 sudo npm -g install @datadog/datadog-ci
95106 sudo -E bash scripts/ci-free-disk-space.sh
@@ -100,9 +111,7 @@ jobs:
100111 needs :
101112 - changes
102113 - setup
103- env :
104- DATADOG_CI_APP_ID : ${{ secrets.GH_APP_DATADOG_VECTOR_CI_APP_ID }}
105- if : ${{ github.event_name == 'merge_group' || env.DATADOG_CI_APP_ID }}
114+ if : ${{ needs.setup.outputs.can_access_secrets == 'true' || github.event_name == 'merge_group' }}
106115 strategy :
107116 matrix :
108117 # TODO: Add "splunk" back once https://github.com/vectordotdev/vector/issues/22379 is fixed.
You can’t perform that action at this time.
0 commit comments