2023-04-11 02:26:04 +00:00
|
|
|
name: Docker-CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/*
|
|
|
|
paths:
|
|
|
|
- frontend/**
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/*
|
|
|
|
paths:
|
|
|
|
- frontend/**
|
2024-07-24 02:55:58 +00:00
|
|
|
types: [ opened, synchronize, reopened, unlocked, ready_for_review ]
|
2023-04-11 02:26:04 +00:00
|
|
|
|
2023-06-22 13:22:46 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-04-11 02:26:04 +00:00
|
|
|
jobs:
|
|
|
|
build-app:
|
|
|
|
if: github.event.pull_request.draft != true
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout source code
|
2024-02-17 13:38:12 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-11 02:26:04 +00:00
|
|
|
|
2024-04-03 09:16:32 +00:00
|
|
|
- name: Set up Docker Compose
|
|
|
|
run: |
|
|
|
|
docker-compose --version || {
|
|
|
|
echo "Docker Compose not found, installing..."
|
|
|
|
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
|
|
sudo chmod +x /usr/local/bin/docker-compose
|
|
|
|
docker-compose --version
|
|
|
|
}
|
|
|
|
|
2023-04-11 02:26:04 +00:00
|
|
|
- name: Build the app
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
set -eu -o pipefail
|
|
|
|
cd frontend/scripts/docker-buildfiles
|
|
|
|
docker-compose build --no-cache --progress=plain \
|
|
|
|
| while read line; do \
|
|
|
|
if [[ "$line" =~ ^Step[[:space:]] ]]; then \
|
|
|
|
echo "$(date -u '+%H:%M:%S') | $line"; \
|
|
|
|
else \
|
|
|
|
echo "$line"; \
|
|
|
|
fi; \
|
2024-04-03 09:16:32 +00:00
|
|
|
done
|