Skip to content

BUILD AND PUBLISH BRANCHES #149

BUILD AND PUBLISH BRANCHES

BUILD AND PUBLISH BRANCHES #149

name: BUILD AND PUBLISH BRANCHES
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * 1"
jobs:
build_and_push:
name: "Build and push"
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 🚂 Get latest code
uses: actions/checkout@v2
##########################################
# DEPENDENCIES
- name: ✨ Log into registry
run: echo "${{ secrets.DOCKER_LOGIN_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_LOGIN_USERNAME }} --password-stdin
- name: 🐈 Pull alpine:latest
run: docker pull alpine:latest
##########################################
# BUILD
- name: 🏗️ Build all channels
run: |
docker compose -f ./docker-compose.yml build --compress --parallel \
flutter-stable flutter-beta flutter-master \
&& docker compose -f ./docker-compose.yml build --compress --parallel \
flutter-stable-web flutter-stable-android flutter-beta-web flutter-beta-android flutter-master-web flutter-master-android
##########################################
# DEPLOY
- name: 🔥 Deploy to Docker Hub
run: docker compose -f ./docker-compose.yml push
##########################################
# PRUNE ALL
- name: 🗑️ Prune images
run: make prune