Skip to content

Commit

Permalink
fix: only use dart for the ci, flutter is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Nov 27, 2023
1 parent 91e3b56 commit cc308b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
27 changes: 13 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@ LABEL "com.github.actions.color"="blue"
# Install system dependencies for Git, Curl, and Unzip
RUN apt-get update && apt-get install -y git curl unzip xz-utils

# Copy the package.json and package-lock.json
COPY package*.json ./
RUN npm install

# Install Dart and Flutter
# Set the Flutter version you want to use
ENV FLUTTER_VERSION=stable
RUN git clone --branch $FLUTTER_VERSION https://github.com/flutter/flutter.git /usr/local/flutter
# Install Dart
RUN apt-get update && apt-get install -y apt-transport-https
RUN sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
RUN sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
RUN apt-get update && apt-get install -y dart

# Add Flutter to PATH
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
# Add Dart to PATH
ENV PATH="/usr/lib/dart/bin:${PATH}"

# Pre-download development binaries and libraries
RUN flutter precache
# Install npm dependencies
COPY package*.json ./
RUN npm install

# Run basic check to download Dark SDK
RUN flutter doctor
# Install Dart dependencies
COPY pubspce.* ./
RUN dart pub get

# Copy the rest of your action's code
COPY . .
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async function configurePubDevToken() {
}

async function analyzeDartProject() {
await runInWorkspace('dart', ['pub', 'get'])
await runInWorkspace('dart', ['analyze'])
await runInWorkspace('dart', ['format', '--set-exit-if-changed', '.'])
await runInWorkspace('dart', ['pub', 'publish', '--dry-run'])
Expand Down

0 comments on commit cc308b2

Please sign in to comment.