-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Oss 751 add release repo dispatch #755
Oss 751 add release repo dispatch #755
Conversation
name: release-repo-dispatch | ||
|
||
on: | ||
repository_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we specify the type for safety here?
on:
repository_dispatch:
types: [update_killbill-commons_version]
update_version_from_repository_dispatch: | ||
uses: killbill/gh-actions-shared/.github/workflows/update-version.yml@main | ||
|
||
# If CI failed, should we revert commit? I don't think so, since we still have release.yml with "workflow_dispatch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should run CI in parallel. It takes a very long time + as you said, we can fix things manually (this would be in other repos and wouldn't be a release blocker).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"parallel" means we don't need to call needs: update_version_from_repository_dispatch
so each job will run together? But we need to update version before we run build and release, no?
uses: ./.github/workflows/ci.yml | ||
needs: update_version_from_repository_dispatch | ||
|
||
release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To your comment (https://github.com/killbill/gh-actions-shared/pull/41/files#r1232894706), I'm thinking indeed that we don't need to share that workflow.
But I also think we don't even need it. You could just call release.yml
and specify the new version to update:
description: 'New killbill-commons version' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.... You could just call release.yml and specify the new version to update:
@pierre do you mean as something like:
....
release-jobs:
name: "Test Various Workflow"
uses: ./.github/workflows/dispatch_and_call.yml
with:
commons_version: <from_repository_dispatch>
....
? If so, it is not working. See this action result (hello_msg
and is_exist
is not set at all). This is repeatable and you can try here. main workflow file that simulate our release.yml
is here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need the shared workflow (nor this PR).
In https://github.com/killbill/killbill-commons/pull/167/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R118, could you call the workflow dispatch to trigger the existing release.yml
workflow (and specify commons_version
in the payload)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierre I update PR in commons. The payload now:
"{\"event_type\":\"update_kb_commons_version\", \"client_payload\": {\"commons_version\": \"$PROJECT_VERSION\"}}"
you can give a feedback.
As PR in this repo, I think we need at least:
repository_dispatch:
types: [update_kb_commons_version, update_kb_base_plugin_version, update_kb_platform_version, update_kb_client_version]
as you mentioned above, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, I don't think that this is will work. Variables from repository_dispatch
's payload will be github.event.client_payload.*
, and what workflow_dispatch
will be github.event.inputs.*
.
I tried to set default like this:
....
inputs:
hello-msg:
description: "Hello Message"
type: string
required: false
default: ${{ github.event.client_payload.hello-msg }}
but this is not valid.
9f11e09
to
c9a94e8
Compare
c9a94e8
to
93d26ea
Compare
Close this PR. |
Original issue: #751
See complete explanation here: killbill/gh-actions-shared#41