diff --git a/.github/composite_actions/log_cw_metric_wrapper/action.yaml b/.github/composite_actions/log_cw_metric_wrapper/action.yaml index 956de54c98e..0d3ab7534a7 100644 --- a/.github/composite_actions/log_cw_metric_wrapper/action.yaml +++ b/.github/composite_actions/log_cw_metric_wrapper/action.yaml @@ -53,14 +53,6 @@ inputs: runs: using: "composite" steps: - - name: Exit if not scheduled - shell: bash - run: | - if [ "${{ github.event_name }}" != "schedule" ]; then - echo "This was not triggered by a schedule, skipping." - echo "SKIP_CW=true" >> $GITHUB_ENV - fi - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0 if: env.SKIP_CW != 'true' with: @@ -83,7 +75,7 @@ runs: job-status: ${{ inputs.job-status }} github-token: ${{ inputs.github-token }} - metric-name: "github_metric_2.0" + metric-name: "github_metric_3.0" test-type: ${{ inputs.test-type }} working-directory: ${{ inputs.working-directory }} diff --git a/actions/bin/log_cw_metric.dart b/actions/bin/log_cw_metric.dart index ea0d15fdf33..ca082a8ceb4 100644 --- a/actions/bin/log_cw_metric.dart +++ b/actions/bin/log_cw_metric.dart @@ -12,6 +12,8 @@ import 'package:collection/collection.dart'; Future main(List args) => wrapMain(logMetric); Future logMetric() async { + const defaultValue = 'none'; + // Inputs for Failing Step final jobStatus = core.getRequiredInput('job-status'); @@ -104,19 +106,22 @@ Future logMetric() async { final workflowName = '${github.context.workflow}/${github.context.job}'; - final framework = core.getInput('framework', defaultValue: ''); + final framework = core.getInput('framework', defaultValue: defaultValue); if (!['dart', 'flutter'].contains(framework)) { throw Exception( 'framework input of $framework must be one of: dart, flutter', ); } final flutterDartChannel = - core.getInput('flutter-dart-channel', defaultValue: ''); - final dartVersion = core.getInput('dart-version', defaultValue: ''); - final flutterVersion = core.getInput('flutter-version', defaultValue: ''); - final dartCompiler = core.getInput('dart-compiler', defaultValue: ''); - final platform = core.getInput('platform', defaultValue: ''); - final platformVersion = core.getInput('platform-version', defaultValue: ''); + core.getInput('flutter-dart-channel', defaultValue: defaultValue); + final dartVersion = core.getInput('dart-version', defaultValue: defaultValue); + final flutterVersion = + core.getInput('flutter-version', defaultValue: defaultValue); + final dartCompiler = + core.getInput('dart-compiler', defaultValue: defaultValue); + final platform = core.getInput('platform', defaultValue: defaultValue); + final platformVersion = + core.getInput('platform-version', defaultValue: defaultValue); final value = isFailed ? '1' : '0';