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
질문됨 일 년 전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
답변함 일 년 전
  • 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
답변함 일 년 전
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
답변함 일 년 전
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
답변함 일 년 전
  • 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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠