Skip to content

Commit

Permalink
Updating site.
Browse files Browse the repository at this point in the history
  • Loading branch information
edufolly committed Feb 12, 2024
1 parent 119de95 commit ebff096
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 165 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" == "v$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 }}
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 ebff096

Please sign in to comment.