feat: test ci cd
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
name: CD Test
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- CI
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: ${{ gitea.event_name == 'workflow_dispatch' || gitea.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: runner
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
steps:
|
||||
- name: Login Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ vars.REGISTRY }} \
|
||||
-u "${{ vars.REGISTRY_USERNAME }}" \
|
||||
--password-stdin
|
||||
|
||||
- name: Pull and Deploy
|
||||
working-directory: /data/www/server/deploy
|
||||
run: |
|
||||
docker pull ${{ vars.REGISTRY }}/lone/bff:latest
|
||||
docker pull ${{ vars.REGISTRY }}/lone/product:latest
|
||||
docker pull ${{ vars.REGISTRY }}/lone/admin:latest
|
||||
docker compose up -d
|
||||
Reference in New Issue
Block a user