Skip to content

Commit

Permalink
Prepare transition to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
axel-op committed Aug 14, 2020
1 parent 2ca615f commit 28f32b1
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 85 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@ name: Docker image update
on:
push:
branches:
- 'stable'
- "stable"
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

jobs:

build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
tag: [latest, full-sdk]
include:
- tag: full-sdk
tag: [v2, v2-full-sdk]
include:
- tag: v2-full-sdk
dockerfile: with-full-sdk/Dockerfile-parent
- tag: latest
- tag: v2
dockerfile: Dockerfile-parent

env:
TAG: ${{ matrix.tag }}
IMAGE: axelop/dart_package_analyzer

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 1
Expand Down Expand Up @@ -76,7 +73,7 @@ jobs:
echo "::set-env name=CURRENT_PANA::$CURRENT_PANA"
echo "::set-env name=CURRENT_DART::$CURRENT_DART"
echo "::set-output name=should_push::$SHOULD_PUSH"
- name: Build new image
if: steps.check.outputs.should_push == 'true'
run: sudo docker build --label "fluttersha=$CURRENT_FLUTTER" --label "panaversion=$CURRENT_PANA" --label "dartdigest=$CURRENT_DART" -f ${{ matrix.dockerfile }} -t $IMAGE:$TAG .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM axelop/dart_package_analyzer:latest
FROM axelop/dart_package_analyzer:v2

ENTRYPOINT ["/dart_package_analyzer"]
2 changes: 1 addition & 1 deletion Dockerfile-parent
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ RUN git clone -b stable --depth 1 https://github.com/flutter/flutter.git /flutte
&& flutter --version

# Installing and activating pana
RUN flutter pub global activate pana
RUN flutter pub global activate pana "<0.14.0"
5 changes: 5 additions & 0 deletions app/bin/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ const logger = gaction.log;
dynamic main(List<String> args) async {
exitCode = 0;

logger.warning(
"This version of the dart-package-analyzer action (v2) uses an old version of Pana, and won't be maintained anymore."
" Switch to v3 to use the latest version of Pana."
" See https://github.com/axel-op/dart-package-analyzer.");

// Parsing user inputs and environment variables
final Inputs inputs = Inputs();

Expand Down
98 changes: 28 additions & 70 deletions test/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,69 +1,62 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
charcode:
version: "2.0.0"
characters:
dependency: transitive
description:
name: charcode
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
collection:
version: "1.0.0"
charcode:
dependency: transitive
description:
name: collection
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
version: "1.1.3"
clock:
dependency: transitive
description:
name: convert
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
version: "1.0.1"
collection:
dependency: transitive
description:
name: crypto
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "1.14.13"
extra_pedantic:
dependency: "direct dev"
description:
name: extra_pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1+3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -74,20 +67,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
Expand All @@ -101,28 +87,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "1.7.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -134,14 +99,14 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -169,27 +134,20 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
2 changes: 1 addition & 1 deletion with-full-sdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM axelop/dart_package_analyzer:full-sdk
FROM axelop/dart_package_analyzer:v2-full-sdk

ENTRYPOINT ["/dart_package_analyzer"]
2 changes: 1 addition & 1 deletion with-full-sdk/Dockerfile-parent
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ RUN git clone -b stable --depth 1 https://github.com/flutter/flutter.git /flutte
&& flutter --version

# Installing and activating pana
RUN pub global activate pana
RUN pub global activate pana "<0.14.0"

0 comments on commit 28f32b1

Please sign in to comment.