Skip to content

Commit 49cd171

Browse files
committed
split longer lines
1 parent cf12a39 commit 49cd171

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

.github/workflows/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- uses: ./
7070
with:
7171
channel: stable
72-
flutter-version: "3.10.6"
72+
flutter-version: 3.10.6
7373
cache: true
7474
- run: dart --version
7575
shell: bash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ steps:
5757
- name: Set up Flutter
5858
uses: subosito/flutter-action@v2
5959
with:
60-
flutter-version: "3.x"
60+
flutter-version: 3.x
6161
channel: any
6262
- run: flutter --version
6363
```

action.yaml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ author: Alif Rachmawadi
44
branding:
55
icon: maximize
66
color: blue
7+
78
inputs:
89
flutter-version:
910
description: The Flutter version to make available on the path
@@ -37,6 +38,7 @@ inputs:
3738
description: The architecture of Flutter SDK executable (x64 or arm64)
3839
required: false
3940
default: "${{ runner.arch }}"
41+
4042
outputs:
4143
CACHE-KEY:
4244
value: "${{ steps.flutter-action.outputs.CACHE-KEY }}"
@@ -59,32 +61,51 @@ outputs:
5961
PUB-CACHE-PATH:
6062
value: "${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}"
6163
description: Path to pub cache
64+
6265
runs:
6366
using: composite
6467
steps:
6568
- name: Make setup script executable
6669
run: chmod +x "$GITHUB_ACTION_PATH/setup.sh"
6770
shell: bash
68-
- name: Print configuration
71+
72+
- name: Set action inputs
6973
id: flutter-action
70-
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 }}
7174
shell: bash
75+
run: |
76+
$GITHUB_ACTION_PATH/setup.sh -p \
77+
-c '${{ inputs.cache-path }}' \
78+
-k '${{ inputs.cache-key }}' \
79+
-d '${{ inputs.pub-cache-path }}' \
80+
-l '${{ inputs.pub-cache-key }}' \
81+
-n '${{ inputs.flutter-version }}' \
82+
-a '${{ inputs.architecture }}' \
83+
${{ inputs.channel }}
84+
7285
- name: Cache Flutter
73-
if: ${{ inputs.cache == 'true' }}
7486
uses: actions/cache@v4
87+
if: ${{ inputs.cache == 'true' }}
7588
with:
7689
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
7790
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}
7891
restore-keys: |
7992
${{ steps.flutter-action.outputs.CACHE-KEY }}
93+
8094
- name: Cache pub dependencies
81-
if: ${{ inputs.cache == 'true' }}
8295
uses: actions/cache@v4
96+
if: ${{ inputs.cache == 'true' }}
8397
with:
8498
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
8599
key: ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
86100
restore-keys: |
87101
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
88102
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
89-
- run: $GITHUB_ACTION_PATH/setup.sh -c '${{ steps.flutter-action.outputs.CACHE-PATH }}' -n '${{ steps.flutter-action.outputs.VERSION }}' -a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' ${{ steps.flutter-action.outputs.CHANNEL }}
103+
104+
- name: Run setup script
90105
shell: bash
106+
run: |
107+
$GITHUB_ACTION_PATH/setup.sh \
108+
-c '${{ steps.flutter-action.outputs.CACHE-PATH }}' \
109+
-n '${{ steps.flutter-action.outputs.VERSION }}' \
110+
-a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' \
111+
${{ steps.flutter-action.outputs.CHANNEL }}

0 commit comments

Comments
 (0)