git
This commit is contained in:
parent
0de8356cc9
commit
b93de06cc0
1 changed files with 18 additions and 17 deletions
|
|
@ -68,29 +68,30 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y rsync openssh-client jq
|
apt-get update && apt-get install -y rsync openssh-client jq
|
||||||
|
|
||||||
- name: Setup Flutter
|
- name: Restore Flutter cache
|
||||||
uses: https://github.com/subosito/flutter-action@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.35.5'
|
path: /opt/flutter
|
||||||
channel: 'stable'
|
key: flutter-${{ runner.os }}-${{ hashFiles('**/pubspec.yaml') }}
|
||||||
cache: false
|
restore-keys: |
|
||||||
|
flutter-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Ensure Flutter directory is a git repo
|
- name: Install Flutter if missing
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$FLUTTER_ROOT" ]; then
|
if [ ! -d /opt/flutter/bin ]; then
|
||||||
echo "FLUTTER_ROOT is empty, flutter-action probably didn't run correctly"
|
echo "Flutter not found in cache. Cloning..."
|
||||||
exit 1
|
git clone https://github.com/flutter/flutter.git /opt/flutter
|
||||||
fi
|
cd /opt/flutter
|
||||||
|
git checkout 3.35.5
|
||||||
cd "$FLUTTER_ROOT"
|
|
||||||
|
|
||||||
if [ ! -d .git ]; then
|
|
||||||
echo "Initializing .git in $FLUTTER_ROOT"
|
|
||||||
git init
|
|
||||||
else
|
else
|
||||||
echo ".git already exists in $FLUTTER_ROOT"
|
echo "Using cached Flutter"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "FLUTTER_ROOT=/opt/flutter" >> $GITHUB_ENV
|
||||||
|
echo "/opt/flutter/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
flutter --version
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue