Supprimer .gitea/workflows/ci-main.yml
This commit is contained in:
parent
96f09480d2
commit
84737843c8
@ -1,84 +0,0 @@
|
|||||||
# Template
|
|
||||||
name: Deployment Verification
|
|
||||||
|
|
||||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Start up services using Docker Compose
|
|
||||||
run: docker compose -f docker-compose.yml up -d
|
|
||||||
|
|
||||||
- name: Print Docker Compose services status
|
|
||||||
run: docker ps
|
|
||||||
|
|
||||||
- name: Shutdown Docker Compose services
|
|
||||||
if: always()
|
|
||||||
run: docker compose -f docker-compose.yml down
|
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
docker compose --profile setup down
|
|
||||||
rm -rf /workspace/tips-of-mine/metabase/*
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Create necessary Docker networks
|
|
||||||
run: |
|
|
||||||
docker network create back_network || true
|
|
||||||
docker network create traefik_front_network || true
|
|
||||||
|
|
||||||
- name: Start up services using Docker Compose
|
|
||||||
run: docker compose -f docker-compose.yml up -d
|
|
||||||
|
|
||||||
# - name: Modify /etc/hosts for internal routing
|
|
||||||
# run: |
|
|
||||||
# echo "127.0.0.1 metabase metabase.tips-of-mine.local" | sudo tee -a /etc/hosts
|
|
||||||
|
|
||||||
- name: Print Docker Compose services status
|
|
||||||
run: docker ps
|
|
||||||
|
|
||||||
- name: Wait for the application to be ready via Traefik
|
|
||||||
run: |
|
|
||||||
echo "Checking the routing and availability of application via Traefik..."
|
|
||||||
timeout 5m bash -c 'while ! curl -fsSLk "https://metabase.tips-of-mine.com"; do echo "Waiting for the application to be ready..."; sleep 10; done'
|
|
||||||
|
|
||||||
- name: Inspect Network Configuration
|
|
||||||
run: |
|
|
||||||
docker network inspect back_network
|
|
||||||
docker network inspect traefik_front_network
|
|
||||||
|
|
||||||
- name: Shutdown Docker Compose services
|
|
||||||
if: always()
|
|
||||||
run: docker compose -f docker-compose.yml down
|
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
docker compose --profile setup down
|
|
||||||
rm -rf /workspace/tips-of-mine/metabase/*
|
|
Loading…
x
Reference in New Issue
Block a user