Skip to content

Commit

Permalink
revert type change to withContent
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Jul 18, 2022
1 parent 860bc7a commit bc155cb
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dart.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions mono_repo/lib/src/commands/github/action_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum ActionInfo implements Comparable<ActionInfo> {
Step usage({
String? name,
String? id,
Map<String, String>? withContent,
Map<String, dynamic>? withContent,
}) {
name ??= this.name;
final step = Step.uses(
Expand All @@ -80,7 +80,7 @@ Job _coverageCompletionJob() => Job(
withContent: {
// https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
'github-token': r'${{ secrets.GITHUB_TOKEN }}',
'parallel-finished': 'true'
'parallel-finished': true
},
)
],
Expand Down
2 changes: 1 addition & 1 deletion mono_repo/lib/src/commands/github/github_yaml.dart
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class _CommandEntry extends _CommandEntryBase implements GitHubActionOverrides {
final Map<String, String>? env;

@override
final Map<String, String>? withContent;
final Map<String, dynamic>? withContent;

@override
final String? shell;
Expand Down
2 changes: 1 addition & 1 deletion mono_repo/lib/src/commands/github/overrides.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class GitHubActionOverrides {
///
/// A map of key-value pairs which are passed to the action's `with`
/// parameter.
Map<String, String>? get withContent;
Map<String, dynamic>? get withContent;

/// The condition on which to run this action.
String? get ifContent;
Expand Down
2 changes: 1 addition & 1 deletion mono_repo/lib/src/commands/github/step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Step implements GitHubActionOverrides, YamlLike {
final String? uses;
@override
@JsonKey(name: 'with')
final Map<String, String>? withContent;
final Map<String, dynamic>? withContent;

@override
final String? shell;
Expand Down
2 changes: 1 addition & 1 deletion mono_repo/lib/src/commands/github/step.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mono_repo/lib/src/github_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class GitHubActionConfig implements GitHubActionOverrides {
final String? uses;

@override
final Map<String, String>? withContent;
final Map<String, dynamic>? withContent;

@override
final String? ifContent;
Expand Down
5 changes: 3 additions & 2 deletions mono_repo/lib/src/task_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package_flavor.dart';

abstract class TaskType implements Comparable<TaskType> {
static const command = _CommandTask();

const factory TaskType.githubAction(GitHubActionConfig config) =
_GitHubActionTaskType;

Expand Down Expand Up @@ -168,14 +169,14 @@ class _TestWithCoverageTask extends TaskType {
'github-token': r'${{ secrets.GITHUB_TOKEN }}',
'path-to-lcov': '$packageDirectory/coverage/lcov.info',
'flag-name': 'coverage_$countString',
'parallel': 'true',
'parallel': true,
},
),
if (config.coverageProcessors.contains(CoverageProcessor.codecov))
ActionInfo.codecov.usage(
withContent: {
'files': '$packageDirectory/coverage/lcov.info',
'fail_ci_if_error': 'true',
'fail_ci_if_error': true,
'name': 'coverage_$countString',
},
),
Expand Down

0 comments on commit bc155cb

Please sign in to comment.