Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/codex-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ jobs:
&& github.event.pull_request.head.repo.full_name != github.repository
&& needs.check.outputs.any_modified == 'true'
run: |
echo "::warning::Preview deployments are only available for PRs from the same repository, not from forks." \
"You can either change the event to pull_request_target or push the branch to the upstream repository instead."
echo "::warning::Preview deployments and Elastic Internal Docs cross-links are not available for PRs from forks. Fork pull_request jobs cannot clone elastic/codex-link-index or deploy previews. Push the branch to the upstream repository instead."
- name: Skip build
if: needs.check.outputs.any_modified == 'false'
run: |
Expand Down
13 changes: 13 additions & 0 deletions codex/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ runs:
with:
vault-instance: "ci-prod"
vault-role: "${{ steps.generate-vault-role.outputs.result }}"
- name: Explain codex-link-index token fetch failure
if: steps.fetch-ephemeral-token.outcome == 'failure'
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
REPOSITORY: ${{ github.repository }}
run: |
if [[ "${EVENT_NAME}" == "pull_request" && "${HEAD_REPOSITORY}" != "${REPOSITORY}" ]]; then
echo "::error::Fork pull_request jobs cannot clone elastic/codex-link-index. GitHub does not mint an OIDC token for fork PRs, so cross-links declared in docset.yml cannot be validated. Push the branch to ${REPOSITORY} and open the PR from there."
else
echo "::warning::Could not fetch a GitHub token for elastic/codex-link-index. Cross-links declared in docset.yml may fail to resolve. Confirm permissions.id-token: write on this job and that catalog-info registers a token policy for this workflow."
fi
- name: Build
shell: bash
run: |
Expand Down
Loading