Actualiser .gitea/workflows/ci-main.yml
This commit is contained in:
parent
2c1e45d6e5
commit
1dab6e6f87
@ -1,16 +1,44 @@
|
|||||||
# Template
|
# Template
|
||||||
name: Deployment Verification
|
name: Deployment Verification
|
||||||
|
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- release
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-and-test:
|
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
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -30,8 +58,7 @@ jobs:
|
|||||||
|
|
||||||
# - name: Modify /etc/hosts for internal routing
|
# - name: Modify /etc/hosts for internal routing
|
||||||
# run: |
|
# run: |
|
||||||
# echo "127.0.0.1 gitea.tips-of-mine.com" | sudo tee -a /etc/hosts
|
# echo "127.0.0.1 metabase metabase.tips-of-mine.local" | sudo tee -a /etc/hosts
|
||||||
# echo "127.0.0.1 dashboard.tips-of-mine.com" | sudo tee -a /etc/hosts
|
|
||||||
|
|
||||||
- name: Print Docker Compose services status
|
- name: Print Docker Compose services status
|
||||||
run: docker ps
|
run: docker ps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user