BUILD AND PUBLISH BRANCHES #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |