Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: release workflow to open a PR on docs repo with latest changes #9583

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Jun 21, 2022

closes #9296

follow-up docker/docs#14976

What I did

creates workflow with a release published types event. This workflow will be triggered when a release is published. The step in this workflow will send a compose-docs event with a payload that contains the git context and release name from GitHub event as well as the dockerfile target that will be used upstream. here we use the official actions/github-script action instead of a community one to send the event.

creates workflow with a release published types event. This workflow will be triggered when a release is published. The step in this workflow will clone the remote docs repository, build the docs-reference stage in this repo and open a PR on docs repo with latest changes.

cc @glours

Related issue

(not mandatory) A picture of a cute animal, if possible in relation with what you did

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

name: Sending ${{ env.EVENT_NAME }} event to ${{ env.UPSTREAM_OWNER }}/${{ env.UPSTREAM_REPO }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GHPAT_DOCS_DISPATCH }}
Copy link
Member Author

Choose a reason for hiding this comment

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

secret is in the org settings, no need to add it in this repo.

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @crazy-max 👍

@crazy-max
Copy link
Member Author

Convert to draft for now, see docker/docs#14976 (comment)

@crazy-max crazy-max marked this pull request as draft June 24, 2022 16:16
@crazy-max crazy-max changed the title ci: workflow to dispatch event on release for docs reference ci: release workflow to open a PR on docs repo with latest changes Jun 24, 2022
@crazy-max
Copy link
Member Author

crazy-max commented Jun 24, 2022

As we can directly open a PR on docs repo from here there is no need to rely on dispatch events which avoid creating a workflow on docs repo: docker/docs#14976 (comment)

PTAL @glours

@crazy-max crazy-max marked this pull request as ready for review June 24, 2022 16:32
@crazy-max crazy-max requested a review from glours June 24, 2022 16:35
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants