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
已提問 1 年前檢視次數 493 次
5 個答案
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
專家
Ranjith
已回答 1 年前
  • 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
專家
Ranjith
已回答 1 年前
0
已接受的答案

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
專家
Ranjith
已回答 1 年前
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
專家
Ranjith
已回答 1 年前
  • 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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南