add
This commit is contained in:
56
.gitea/workflows/deploy-dev.yaml
Normal file
56
.gitea/workflows/deploy-dev.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Deploy Dev
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: [ dev ]
|
||||
steps:
|
||||
- name: login
|
||||
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
- name: build nginx dev
|
||||
run: docker build -t mathwave/sprint-repo:sprint-infra-nginx-dev nginx/nginx-dev
|
||||
- name: build gitea runner
|
||||
run: docker build -t mathwave/sprint-repo:gitea-runner gitea-runner
|
||||
push:
|
||||
name: Push
|
||||
runs-on: [ dev ]
|
||||
needs: build
|
||||
steps:
|
||||
- name: push nginx dev
|
||||
run: docker push mathwave/sprint-repo:sprint-infra-nginx-dev
|
||||
- name: push gitea runner
|
||||
run: docker push mathwave/sprint-repo:gitea-runner
|
||||
deploy-dev:
|
||||
name: Deploy dev
|
||||
runs-on: [dev]
|
||||
needs: push
|
||||
steps:
|
||||
- name: login
|
||||
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
- name: deploy swarmpit
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-dev.yaml swarmpit
|
||||
- name: deploy portainer
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-portainer/deploy-dev.yaml portainer
|
||||
- name: deploy infra
|
||||
env:
|
||||
MONGO_PASSWORD_DEV: ${{ secret.MONGO_PASSWORD_DEV }}
|
||||
DB_PASSWORD_DEV: ${{ secrets.POSTGRES_PASSWORD_DEV }}
|
||||
MINIO_PASSWORD_DEV: ${{ secrets.MINIO_PASSWORD_DEV }}
|
||||
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD_DEV }}
|
||||
RABBITMQ_PASSWORD: ${{ secrets.RABBITMQ_PASSWORD_DEV }}
|
||||
REGISTRATION_TOKEN: ${{ secrets.REGISTRATION_TOKEN }}
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-infra/deploy-dev.yaml infra
|
56
.gitea/workflows/deploy-prod.yaml
Normal file
56
.gitea/workflows/deploy-prod.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Deploy Prod
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- prod
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: [ dev ]
|
||||
steps:
|
||||
- name: login
|
||||
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: dev
|
||||
- name: build nginx prod
|
||||
run: docker build -t mathwave/sprint-repo:sprint-infra-nginx-prod nginx/nginx-prod
|
||||
- name: build gitea runner
|
||||
run: docker build -t mathwave/sprint-repo:gitea-runner gitea-runner
|
||||
push:
|
||||
name: Push
|
||||
runs-on: [ dev ]
|
||||
needs: build
|
||||
steps:
|
||||
- name: push nginx prod
|
||||
run: docker push mathwave/sprint-repo:sprint-infra-nginx-prod
|
||||
- name: push gitea runner
|
||||
run: docker push mathwave/sprint-repo:gitea-runner
|
||||
deploy-prod:
|
||||
name: Deploy prod
|
||||
runs-on: [prod]
|
||||
needs: push
|
||||
steps:
|
||||
- name: login
|
||||
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: prod
|
||||
- name: deploy swarmpit
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-prod.yaml swarmpit
|
||||
- name: deploy portainer
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-portainer/deploy-prod.yaml portainer
|
||||
- name: deploy infra
|
||||
env:
|
||||
MONGO_PASSWORD_DEV: ${{ secret.MONGO_PASSWORD_PROD }}
|
||||
DB_PASSWORD_DEV: ${{ secrets.POSTGRES_PASSWORD_PROD }}
|
||||
MINIO_PASSWORD_DEV: ${{ secrets.MINIO_PASSWORD_PROD }}
|
||||
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD_PROD }}
|
||||
RABBITMQ_PASSWORD: ${{ secrets.RABBITMQ_PASSWORD_PROD }}
|
||||
REGISTRATION_TOKEN: ${{ secrets.REGISTRATION_TOKEN }}
|
||||
run: docker stack deploy --with-registry-auth -c ./.deploy-infra/deploy-prod.yaml infra
|
Reference in New Issue
Block a user