mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

GitHub workflow fails for fork #179

Closed svenssonaxel closed 1 year ago

svenssonaxel commented 1 year ago

After forking the starter template and pushing my plugin code to GitHub, the workflow keeps failing due to missing AWS keys. If I need or should want such keys, then why, otherwise what's the recommended way to deal with it? Either way, could we add a section to README.md about it?

hanzei commented 1 year ago

@spirosoik We briefly talked about this issue when you did the migration. We need to ensure that the Workflow is usually for community members without any further changes. Can you please take a look what causes the workflow to fail on a fork?

spirosoik commented 1 year ago

@toninis could you have a look here please?

toninis commented 1 year ago

@svenssonaxel can you please share the repo you are facing the issue ? Maybe we 've missed the fix there.

kaakaa commented 1 year ago

I encountered same issue in https://github.com/kaakaa/mmplugin-ci-test/actions that is created from this template. In Actions tab, ci #1 and #2 failed, and #3 is the result after merging https://github.com/mattermost/mattermost-plugin-starter-template/pull/184/commits/50562ede056b1cc892c0a8015af50734e446adad but it also failed. So #184 doen't seem to fix this issue.

Just idea: plugin-ci/delivery job needs secrets.PLUGIN_AWS_ACCESS_KEY_ID and secrets.PLUGIN_AWS_ACCESS_KEY_ID to run, so it would be possible to fix this by checking if those secrets was set before running plugin-ci/delivery (here). (Even if those secrets was set, plugin-ci/delivery from a community member will fail because they don't have permissions to write archives into mattermost-plugins-ci/ci/ bucket.)

Also about cd part, I as community member don't need plugin-cd/release-s3, but need plugin-cd/release-github because it is very useful that cd job create GitHub Release and attach plugin archive to it like herre.

toninis commented 1 year ago

No it won't fix the issue since this dedicated for our needs . We will discuss the course of action internally and revert back to you. As a workaround for now you can just copy the cd part without the plugin-cd/release-s3 part. Thanks for the feedback 👍🏼

toninis commented 1 year ago

This https://github.com/mattermost/actions-workflows/pull/28 should do the trick

hanzei commented 1 year ago

@kaakaa Can you test if https://github.com/mattermost/actions-workflows/pull/28 fixed the cd issue?

kaakaa commented 1 year ago

@hanzei yes, cd issue seems to be resolved. https://github.com/kaakaa/mmplugin-ci-test2/actions But ci from master branch still have the same issue.

hanzei commented 1 year ago

@kaakaa Good point. https://github.com/mattermost/actions-workflows/pull/29 fixes that.