fix: repair marketing compile errors and harden deploy CI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
f53571aa48
commit
5003cacd79
17
.github/workflows/master.yml
vendored
17
.github/workflows/master.yml
vendored
@ -18,16 +18,20 @@ jobs:
|
||||
host: ${{ secrets.SSH_BUILD_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script_stop: true
|
||||
script: |
|
||||
set -e
|
||||
mkdir -p /data/projects
|
||||
cd /data/projects
|
||||
git clone git@github.com:xiaoliutral/SimpleAdmin.Api.git
|
||||
if [ ! -d SimpleAdmin.Api/.git ]; then
|
||||
git clone git@github.com:xiaoliutral/SimpleAdmin.Api.git
|
||||
fi
|
||||
cd SimpleAdmin.Api
|
||||
git pull origin master
|
||||
git fetch origin master
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
docker build -t admin_api:latest -f src/SimpleAdmin.Api/Dockerfile .
|
||||
# 标记镜像
|
||||
docker tag admin_api:latest registry.nanafa.com/admin_api:latest
|
||||
# 推送镜像
|
||||
docker push registry.nanafa.com/admin_api:latest
|
||||
- name: Deploy to Server
|
||||
uses: appleboy/ssh-action@v0.1.5
|
||||
@ -35,7 +39,10 @@ jobs:
|
||||
host: ${{ secrets.SSH_MANAGER_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script_stop: true
|
||||
script: |
|
||||
set -e
|
||||
cd /data
|
||||
docker pull registry.nanafa.com/admin_api:latest
|
||||
docker stack deploy -c api.yml api # yml没变化不会更新
|
||||
docker service update --force --image registry.nanafa.com/admin_api:latest api_admin # 一定要和service name一致
|
||||
docker service update --force --image registry.nanafa.com/admin_api:latest api_admin # 一定要和service name一致
|
||||
|
||||
@ -93,8 +93,7 @@ public class MarketingCouponManager : IScopedDependency
|
||||
|
||||
var templates = await _templateRepository.GetListAsync(
|
||||
x => x.Status == CouponTemplateStatus.Active
|
||||
&& x.GrantChannel == MarketingGrantChannels.Newcomer,
|
||||
cancellationToken);
|
||||
&& x.GrantChannel == MarketingGrantChannels.Newcomer);
|
||||
if (templates.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using Fake.Application;
|
||||
using Fake.Domain.Exceptions;
|
||||
using Oms.Domain.CustomersAggregate.Entities;
|
||||
using Oms.Domain.CustomersAggregate.Repositories;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user