Trying to use Flutter Github Action in CodeCatalyst doesnt work

0

Hi all,

I am trying to use this Github Action called "flutter"

The action errors out even if I just use "flutter version" : steps:

  • uses: actions/checkout@v3
  • uses: subosito/flutter-action@v2 with: flutter-version: '3.0.5' channel: 'stable'
  • run: flutter --version

I am not able to find the logfiles for the error - the CodeCatalyst console shows an error but no logfiles.

Error in Flutter

Kind regards Johannes

profile picture
asked a year ago475 views
5 Answers
1

Hi Johannes, Thanks for sharing your initial YAML. I'm glad the YAML I shared worked for you, but just for your information

    1. You don't need to use the checkout action in CodeCatalyst.
  1. Not sure if this is because of pasting the YAML in the post, but there is an extra space before the uses section.
profile pictureAWS
EXPERT
Ranjith
answered a year ago
  • Thanks, that must have happened during the copy/pasting

1

Here's the YAML with the flutter action that worked for me. FYI, you don't need to use the checkout action. If you configure the GitHub Actions action with Inputs -> Sources, that instructs the action to checkout the code in the repository where the workflow is stored aka WorkflowSource.

Name: TestGH
SchemaVersion: "1.0"

Actions:
  FlutterGH:
    Identifier: aws/github-actions-runner@v1
    Inputs:
      Sources:
        - WorkflowSource

    Configuration:
      Steps:
        - name: Flutter action
          uses: subosito/flutter-action@v2
          with:
            flutter-version: '3.0.5'
            channel: 'stable'
        - run: flutter --version
profile pictureAWS
EXPERT
Ranjith
answered a year ago
0
Accepted Answer

I'm not familiar with the Flutter action to give proper guidance. But you can run multiple shell commands using the GitHub run: syntax for each command or use ";" to separate the commands. Did the YAML that you pasted work for you?

Here's what I did and the workflow succeeded

    Configuration:
      Steps:
        - name: Flutter action
          uses: subosito/flutter-action@v2
          with:
            flutter-version: '3.0.5'
            channel: 'stable'
        - run: flutter --version
        - run: echo "hello"; echo "world"

Can you also share that issue you ran into initially when your workflow failed and what fixed it?

profile pictureAWS
EXPERT
Ranjith
answered a year ago
0

Is the Type attribute of Compute configuration set to Lambda either in the action or at the workflow scope? Can you share the YAML configuration of the workflow and the action?

profile pictureAWS
EXPERT
Ranjith
answered a year ago
  • Thanks Ranjith, that helped to solve my problem.

    If I need to switch directories, the only option is to use a ";" inside the "run" - correct?

    Johannes

    GitHubActions_40: Identifier: aws/github-actions-runner@v1

    Inputs:
      Sources:
        - WorkflowSource # This specifies that the action requires this Workflow as a source
    
    Configuration:
      Steps:
        - name: Flutter Build Web
          uses: subosito/flutter-action@v2
          with:
            channel: 'stable'
        - run: cd mydirectory;flutter pub get
    
0

Hey

The original error was "no error visibile" ;) I have fixed that with two things... My initial YAML was

Name: TestGH
SchemaVersion: "1.0"

Actions:
  FlutterGH:
    Identifier: aws/github-actions-runner@v1
    Inputs:
      Sources:
        - WorkflowSource

    Configuration:
      Steps:
        - name: Flutter action
        - uses: actions/checkout@v3
        -  uses: subosito/flutter-action@v2
          with:
            flutter-version: '3.0.5'
            channel: 'stable'
        - run: flutter --version

(had too much - in it and one action too much) - as I had copy/pasted from here: https://github.com/marketplace/actions/flutter-action

profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions