subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.16k stars 193 forks source link

The example yaml code need to be modified #261

Closed mun9769 closed 4 months ago

mun9769 commented 6 months ago
  check-settings:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - id: flutter-action
      - uses: subosito/flutter-action@v2
        with:
          channel: 'stable'
      - run: |
          echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
          echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
          echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
          echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
          echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
        shell: bash

This is the last code in README.md.

When you run this script, github action throw error.

every step must define a uses or run key

If you swap the order of 'id' and 'uses', you can solve this.

subosito commented 4 months ago

The one on the README is already valid:

- uses: actions/checkout@v4
- id: flutter-action
  uses: subosito/flutter-action@v2
  with:
    channel: 'stable'

Seems you put additional - on your example.