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

Support updating a created workflow #19

Closed
jelhan opened this issue Dec 2, 2020 · 0 comments · Fixed by #29
Closed

Support updating a created workflow #19

jelhan opened this issue Dec 2, 2020 · 0 comments · Fixed by #29
Labels
enhancement New feature or request

Comments

@jelhan
Copy link
Owner

jelhan commented Dec 2, 2020

It would be great if create-github-actions-setup-for-ember-addon can update a GitHub Actions workflow created in a previous run.

One way to do so would be storing the configuration used to generate the CI workflow. create-github-actions-setup-for-ember-addon has a configuration interface, which describes the configuration object used to create the CI workflow template:

interface ConfigurationInterface {
browsers: string[];
emberTryScenarios: {
allowedToFail: string[];
required: string[];
};
nodeVersion: string;
packageManager: 'npm' | 'yarn';
}

The parser for TravisCI configuration returns the extracted configuration in that format. The default configuration if no TravisCI configuration also uses that format.

The configuration object used to generate a workflow could be stored at top of the generated CI workflow. It should be stored as a YAML comment to not conflict with the workflow definition itself. It should be stored in a human readable format like YAML. Maybe it's just an outcommented YAML?

# This file has been generated by `yarn create github-actions-setup-for-ember-addon`
# using the following configuration:
#
# browsers:
#   - chrome
# emberTryScenarios:
#   allowedToFail:
#     - ember-beta
#     - ember-canary
#   required:
#     - ember-lts-3.20
#     - ember-release
# nodeVersion: 10
# packageManager: yarn
#
# Running `yarn create github-actions-setup-for-ember-addon` again will update the
# CI workflow to the latest blueprint.

We would than implement a parser similar to the parser for TravisCI configuration, which looks for a .github/workflows/ci.yml and extract the information from previous run out of it.

Maybe we want to store a version together with the configuration object if we want to ship a breaking change in that configuration object.

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

Successfully merging a pull request may close this issue.

1 participant