-
Notifications
You must be signed in to change notification settings - Fork 11
/
action.yml
47 lines (47 loc) · 1.67 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: "Setup Flutter SDK"
description: "Setup the Flutter SDK, and add it to the PATH"
branding:
icon: "triangle"
color: "blue"
inputs:
version:
description: "The version to install: Default: latest"
required: false
default: "latest"
channel:
description: 'The release channel to install. Default: stable'
required: false
default: 'stable'
cache:
description: 'Cache the pub dependencies. Default: false'
required: false
default: "false"
cache-sdk:
description: 'Cache the installed Flutter SDK. Default: false'
required: false
default: "false"
cache-key:
description: "An explicit key for restoring and saving the pub dependencies to/from cache"
required: false
default: "${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}"
runs:
using: "composite"
steps:
# Cache the Flutter SDK
- if: ${{ inputs.cache-sdk == 'true' }}
name: Configure Flutter SDK cache
uses: actions/cache@v4
with:
path: ${{ runner.tool_cache }}/flutter
key: flutter-action-setup-flutter-sdk-${{ runner.os }}-${{ inputs.version }}-${{ runner.arch }}-${{ inputs.channel }}
# Cache the pub dependencies
- if: ${{ inputs.cache == 'true' }}
name: Configure pub dependencies cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/flutter/pub-cache
key: flutter-action-setup-flutter-${{ inputs.cache-key }}-pub-cache-${{ runner.os }}-${{ inputs.version }}-${{ runner.arch }}-${{ inputs.channel }}
# Run the action
- name: Setup Flutter SDK
run: $GITHUB_ACTION_PATH/action.sh ${{ inputs.version }} ${{ inputs.channel }}
shell: bash