Skip to content

Commit

Permalink
Merge pull request #2 from testainers/dev
Browse files Browse the repository at this point in the history
Version 0.0.1.
  • Loading branch information
edufolly authored Feb 12, 2024
2 parents bc5975c + ebff096 commit 450b84c
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 169 deletions.
45 changes: 13 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,34 @@ on:
branches: [ main ]

jobs:
########
# Boot #
########
boot:
name: Boot
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.version-step.outputs.version }}
timeout-minutes: 20
steps:
- name: Code Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get Pubspec Version
id: version-step
run: |
export VERSION=$(grep 'version:' pubspec.yaml | cut -c 10- | cut -f 1 -d '+')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Check if version is used
run: |
URL=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/latest
LATEST=$(curl --silent "$URL" | jq -r .name)
if [ "$LATEST" == "$VERSION" ]; then
echo "Version already used: $VERSION"
URL=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/${{ env.VERSION }}
echo "$URL"
CODE=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
if [ "$CODE" != 404 ]; then
echo "Release '$VERSION' already exists. ($CODE)"
exit 1
fi
##########
# Deploy #
##########
deploy:
name: Deploy
needs: [ boot ]
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
steps:
- name: Code Checkout
uses: actions/checkout@v3

- name: Flutter Environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: Flutter Pub Get
timeout-minutes: 2
Expand All @@ -70,11 +50,12 @@ jobs:
- name: Creating a GitHub Tag
uses: mathieudutour/[email protected]
with:
custom_tag: ${{ needs.boot.outputs.version }}
custom_tag: ${{ env.VERSION }}
tag_prefix: ''
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a GitHub Release
uses: ncipollo/release-action@v1
with:
tag: v${{ needs.boot.outputs.version }}
tag: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Testainers Site
</h1>

[![BuildWithLove](https://img.shields.io/badge/%20built%20with-%20%E2%9D%A4-ff69b4.svg "build with love")](https://github.com/edufolly/testainers/stargazers)
[![Licence](https://img.shields.io/github/license/edufolly/testainers?color=blue "Licence")](https://github.com/testainers/site/blob/main/LICENSE)
[![Build](https://img.shields.io/github/actions/workflow/status/testainers/site/main.yml?branch=main "Build")](https://github.com/testainers/site/releases/latest)

[![Build With Love](https://img.shields.io/badge/%20built%20with-%20%E2%9D%A4-ff69b4.svg)](https://github.com/edufolly/testainers/stargazers)
[![Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2Ftestainers%2Fsite%2Freleases%2Flatest&query=%24.name&label=version&color=orange)](https://testainers.com/)
[![Licence](https://img.shields.io/github/license/edufolly/testainers?color=blue)](https://github.com/testainers/site/blob/main/LICENSE)
[![Build](https://img.shields.io/github/actions/workflow/status/testainers/site/main.yml?branch=main)](https://github.com/testainers/site/releases/latest)

## https://testainers.com/
Binary file added assets/icons/docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
197 changes: 116 additions & 81 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,7 @@ class Site extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ThemeData baseTheme = ThemeData(
primarySwatch: MaterialColor(baseColor.value, <int, Color>{
50: baseColor,
100: baseColor,
200: baseColor,
300: baseColor,
400: baseColor,
500: baseColor,
600: baseColor,
700: baseColor,
800: baseColor,
900: baseColor,
}),
colorSchemeSeed: baseColor,
brightness: Brightness.dark,
visualDensity: VisualDensity.adaptivePlatformDensity,
);
Expand Down Expand Up @@ -89,83 +78,129 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0x00ca8ba2),
appBar: AppBar(
title: const Text('testainers'),
backgroundColor: Colors.black26,
centerTitle: false,
elevation: 0,
),
body: Padding(
padding: const EdgeInsets.all(32),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset('assets/images/testainers-500-transparent.png'),
Text(
'testainers',
style: Theme.of(context)
.textTheme
.titleLarge
?.copyWith(fontSize: 50),
),
Padding(
padding: const EdgeInsets.all(8),
child: Text(
'Testainers is a powerful Dart plugin designed to streamline '
'the management of containers for testing purposes.',
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(fontSize: 20),
),
),
Padding(
padding: const EdgeInsets.all(8),
child: Text(
'With Testainers, developers can effortlessly create, '
'configure, and manage isolated test environments within '
'containers, ensuring consistent and reliable testing '
'processes.',
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(fontSize: 20),
child: Column(
children: <Widget>[
Text(
'testainers',
style: Theme.of(context).textTheme.titleLarge?.copyWith(
fontSize: 50,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Flexible(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/testainers-250-transparent.png',
),
],
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8),
child: ElevatedButton(
onPressed: () =>
launchUrlString('https://pub.dev/packages/testainers'),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset('assets/icons/dart.png', height: 16),
const SizedBox(width: 8),
const Text('pub.dev'),
],
Flexible(
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8),
child: Text(
'Testainers is a powerful Dart plugin designed to streamline '
'the management of containers for testing purposes.',
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(fontSize: 20),
),
),
Padding(
padding: const EdgeInsets.all(8),
child: Text(
'With Testainers, developers can effortlessly create, '
'configure, and manage isolated test environments within '
'containers, ensuring consistent and reliable testing '
'processes.',
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(fontSize: 20),
),
),
],
),
)
],
),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
/// Pub.dev
Padding(
padding: const EdgeInsets.all(8),
child: ElevatedButton(
onPressed: () =>
launchUrlString('https://pub.dev/packages/testainers'),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset('assets/icons/dart.png', height: 16),
const SizedBox(width: 8),
const Text('pub.dev'),
],
),
),
Padding(
padding: const EdgeInsets.all(8),
child: ElevatedButton(
onPressed: () =>
launchUrlString('https://github.com/testainers'),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset('assets/icons/github.png', height: 16),
const SizedBox(width: 8),
const Text('GitHub'),
],
),
),

/// Github
Padding(
padding: const EdgeInsets.all(8),
child: ElevatedButton(
onPressed: () =>
launchUrlString('https://github.com/testainers'),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset('assets/icons/github.png', height: 16),
const SizedBox(width: 8),
const Text('GitHub'),
],
),
),
],
),
],
),
),

/// Docker Hub
Padding(
padding: const EdgeInsets.all(8),
child: ElevatedButton(
onPressed: () => launchUrlString(
'https://hub.docker.com/u/testainers',
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset('assets/icons/docker.png', height: 16),
const SizedBox(width: 8),
const Text('Docker Hub'),
],
),
),
),
],
),
],
),
),
);
Expand Down
Loading

0 comments on commit 450b84c

Please sign in to comment.