Skip to content

feat: docs-publish worfklow - #124

Merged
lurtz merged 25 commits into
mainfrom
dev
Aug 3, 2026
Merged

feat: docs-publish worfklow#124
lurtz merged 25 commits into
mainfrom
dev

Conversation

@AlexanderLanin

@AlexanderLanin AlexanderLanin commented Jun 11, 2026

Copy link
Copy Markdown
Member

Full rewrite and split of docs workflow.
Good architecture split. And coincidentally finally secure.

Proven in use at https://github.com/eclipse-score/infrastructure

@lurtz

lurtz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The version of the docs workflow at main publishes 6GB cache objects. I hope this update will make it much smaller.

@AlexanderLanin

Copy link
Copy Markdown
Member Author

Blocked by #125 / overall caching mess

@AlexanderLanin
AlexanderLanin marked this pull request as ready for review July 31, 2026 09:01

@lurtz lurtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will test if this is able to create comments for PRs from forks and non-forks

Comment thread .github/workflows/docs-publish.yml Outdated
Comment on lines +79 to +83
if [[ "$EVENT_NAME" == "pull_request" || "$EVENT_NAME" == "pull_request_target" ]]; then
# Some fork-origin workflow_run payloads do not include pull_requests[];
# resolve the PR from the run's HEAD commit as a fallback.
# If the workflow_run references a check suite, use it to recover the PR number.
if [[ -z "$PR_NUMBER" && -n "$CHECK_SUITE_ID" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code after first if needs to be shifted right

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

you mean pure formatting, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

will be fixed by merging #177

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you mean pure formatting, right?

yes, it is pure formatting

@lurtz

lurtz commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR should fix placing comments at PRs from forks: #177

* properly indent code

* simplify retrieval of PR number

* bail out if PR number could not be determined

* remove unused variable
@lurtz
lurtz merged commit 206a795 into main Aug 3, 2026
4 checks passed
@lurtz
lurtz deleted the dev branch August 3, 2026 17:36
AlexanderLanin pushed a commit that referenced this pull request Aug 3, 2026
The old docs workflow uses this action @main and now fails. Due the use of `pull_request_target` this makes even switching to the new docs workflow impossible. Thus restore it until all users are migrated.

Caused by #124
etas-contrib-automation Bot pushed a commit to etas-contrib/score_inc_someip_gateway that referenced this pull request Aug 4, 2026
The docs workflow is triggered via `pull_request_target` and gets a lot
of permissions. This is a high security risk. The design splits it into
two pieces where the part with the higher risk is run with reduced
permissions. Only publishing needs more permissions, but does not
execute any foreign code and just copies data.

The behavior has been tested on
https://github.com/lurtz/inc_someip_gateway

Depends on
- eclipse-score/cicd-workflows#158
- eclipse-score/cicd-workflows#124
Chahult added a commit to Chahult/config_management that referenced this pull request Aug 10, 2026
eclipse-score/cicd-workflows#124 split docs.yml into build-only docs.yml +
docs-publish.yml, but per eclipse-score/cicd-workflows#179 this broke PR-head
checkout for pull_request_target events (upstream-acknowledged, still
unresolved). Revert docs.yml to the same pre-split commit already used by
baselibs/logging/communication's external deps, which builds and deploys
docs in one reusable workflow and correctly checks out the PR head via
github.event.pull_request.head.ref regardless of pull_request_target.

- docs.yml: pin to af347722c7ae3ed85518895c11268d96ac728f62 (baselibs' pin)
  and drop the now-unneeded manual refs/pull/<n>/head checkout hack.
- remove docs-publish.yml: deploy is handled internally by the pinned
  docs.yml's docs-deploy job, so no separate publish caller is needed.
- copyright.yml, format.yml, license_check.yml, docs-cleanup.yml: unrelated
  to this bug, pins left unchanged from the prior fixed-SHA pinning commit.
Chahult added a commit to Chahult/config_management that referenced this pull request Aug 10, 2026
eclipse-score/cicd-workflows#124 split docs.yml into build-only docs.yml +
docs-publish.yml, but per eclipse-score/cicd-workflows#179 this broke PR-head
checkout for pull_request_target events (upstream-acknowledged, still
unresolved). Revert docs.yml to the same pre-split commit already used by
baselibs/logging/communication's external deps, which builds and deploys
docs in one reusable workflow and correctly checks out the PR head via
github.event.pull_request.head.ref regardless of pull_request_target.

- docs.yml: pin to af347722c7ae3ed85518895c11268d96ac728f62 (baselibs' pin)
  and drop the now-unneeded manual refs/pull/<n>/head checkout hack.
- remove docs-publish.yml: deploy is handled internally by the pinned
  docs.yml's docs-deploy job, so no separate publish caller is needed.
- copyright.yml, format.yml, license_check.yml, docs-cleanup.yml: unrelated
  to this bug, pins left unchanged from the prior fixed-SHA pinning commit.
michaelsaborov pushed a commit to eclipse-score/config_management that referenced this pull request Aug 11, 2026
eclipse-score/cicd-workflows#124 split docs.yml into build-only docs.yml +
docs-publish.yml, but per eclipse-score/cicd-workflows#179 this broke PR-head
checkout for pull_request_target events (upstream-acknowledged, still
unresolved). Revert docs.yml to the same pre-split commit already used by
baselibs/logging/communication's external deps, which builds and deploys
docs in one reusable workflow and correctly checks out the PR head via
github.event.pull_request.head.ref regardless of pull_request_target.

- docs.yml: pin to af347722c7ae3ed85518895c11268d96ac728f62 (baselibs' pin).
- copyright.yml, format.yml, license_check.yml, docs-cleanup.yml: pin to a
  fixed commit SHA instead of floating @main so upstream changes to these
  reusable workflows cannot silently alter our CI behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants