mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
split longer lines
This commit is contained in:
parent
cf12a39989
commit
49cd17165c
3 changed files with 28 additions and 7 deletions
2
.github/workflows/workflow.yaml
vendored
2
.github/workflows/workflow.yaml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
channel: stable
|
channel: stable
|
||||||
flutter-version: "3.10.6"
|
flutter-version: 3.10.6
|
||||||
cache: true
|
cache: true
|
||||||
- run: dart --version
|
- run: dart --version
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -57,7 +57,7 @@ steps:
|
||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: "3.x"
|
flutter-version: 3.x
|
||||||
channel: any
|
channel: any
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
```
|
```
|
||||||
|
|
31
action.yaml
31
action.yaml
|
@ -4,6 +4,7 @@ author: Alif Rachmawadi
|
||||||
branding:
|
branding:
|
||||||
icon: maximize
|
icon: maximize
|
||||||
color: blue
|
color: blue
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
flutter-version:
|
flutter-version:
|
||||||
description: The Flutter version to make available on the path
|
description: The Flutter version to make available on the path
|
||||||
|
@ -37,6 +38,7 @@ inputs:
|
||||||
description: The architecture of Flutter SDK executable (x64 or arm64)
|
description: The architecture of Flutter SDK executable (x64 or arm64)
|
||||||
required: false
|
required: false
|
||||||
default: "${{ runner.arch }}"
|
default: "${{ runner.arch }}"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
CACHE-KEY:
|
CACHE-KEY:
|
||||||
value: "${{ steps.flutter-action.outputs.CACHE-KEY }}"
|
value: "${{ steps.flutter-action.outputs.CACHE-KEY }}"
|
||||||
|
@ -59,32 +61,51 @@ outputs:
|
||||||
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
|
description: Path to pub cache
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Make setup script executable
|
- name: Make setup script executable
|
||||||
run: chmod +x "$GITHUB_ACTION_PATH/setup.sh"
|
run: chmod +x "$GITHUB_ACTION_PATH/setup.sh"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Print configuration
|
|
||||||
|
- name: Set action inputs
|
||||||
id: flutter-action
|
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 }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
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 }}
|
||||||
|
|
||||||
- name: Cache Flutter
|
- name: Cache Flutter
|
||||||
if: ${{ inputs.cache == 'true' }}
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
if: ${{ inputs.cache == 'true' }}
|
||||||
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 }}
|
||||||
|
|
||||||
- name: Cache pub dependencies
|
- name: Cache pub dependencies
|
||||||
if: ${{ inputs.cache == 'true' }}
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
if: ${{ inputs.cache == 'true' }}
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||||
key: ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
key: ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
||||||
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||||
- 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 }}
|
|
||||||
|
- name: Run setup script
|
||||||
shell: bash
|
shell: bash
|
||||||
|
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 }}
|
||||||
|
|
Loading…
Reference in a new issue