1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

format the action nicely

This commit is contained in:
Bartek Pacia 2024-03-31 19:21:19 +02:00
parent 54a6ca61b1
commit 46719f5374
No known key found for this signature in database

View file

@ -38,36 +38,47 @@ inputs:
required: false required: false
default: "${{ runner.arch }}" default: "${{ runner.arch }}"
outputs: outputs:
CACHE-PATH:
value: "${{ steps.flutter-action.outputs.CACHE-PATH }}"
CACHE-KEY: CACHE-KEY:
value: "${{ steps.flutter-action.outputs.CACHE-KEY }}" value: "${{ steps.flutter-action.outputs.CACHE-KEY }}"
description: Key used to cache the Flutter SDK
CACHE-PATH:
value: "${{ steps.flutter-action.outputs.CACHE-PATH }}"
description: Path to Flutter SDK
CHANNEL: CHANNEL:
value: "${{ steps.flutter-action.outputs.CHANNEL }}" value: "${{ steps.flutter-action.outputs.CHANNEL }}"
description: The selected Flutter release channel
VERSION: VERSION:
value: "${{ steps.flutter-action.outputs.VERSION }}" value: "${{ steps.flutter-action.outputs.VERSION }}"
description: The selected Flutter version
ARCHITECTURE: ARCHITECTURE:
value: "${{ steps.flutter-action.outputs.ARCHITECTURE }}" value: "${{ steps.flutter-action.outputs.ARCHITECTURE }}"
description: The selected Flutter CPU architecture
PUB-CACHE-KEY: PUB-CACHE-KEY:
value: "${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}" value: "${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}"
description: Key used to cache the pub dependencies
PUB-CACHE-PATH: PUB-CACHE-PATH:
value: "${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}" value: "${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}"
description: Path to pub cache
runs: runs:
using: composite using: composite
steps: steps:
- run: chmod +x $GITHUB_ACTION_PATH/setup.sh - name: Make setup script executable
run: chmod +x "$GITHUB_ACTION_PATH/setup.sh"
shell: bash shell: bash
- id: flutter-action - name: Print configuration
id: flutter-action
run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -d '${{ inputs.pub-cache-path }}' -l '${{ inputs.pub-cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }} run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -d '${{ inputs.pub-cache-path }}' -l '${{ inputs.pub-cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
shell: bash shell: bash
- if: ${{ inputs.cache == 'true' }} - name: Cache Flutter
if: ${{ inputs.cache == 'true' }}
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{ steps.flutter-action.outputs.CACHE-PATH }} path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.CACHE-KEY }} key: ${{ steps.flutter-action.outputs.CACHE-KEY }}
restore-keys: | restore-keys: |
${{ steps.flutter-action.outputs.CACHE-KEY }} ${{ steps.flutter-action.outputs.CACHE-KEY }}
- if: ${{ inputs.cache == 'true' }} - name: Cache pub dependencies
if: ${{ inputs.cache == 'true' }}
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }} path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}