feat: sale manager

This commit is contained in:
zzw
2026-08-28 10:49:09 +08:00
parent 97eba7ad48
commit 6f567319be
82 changed files with 4491 additions and 182 deletions
+1
View File
@@ -39,4 +39,5 @@ jobs:
docker pull ${{ vars.REGISTRY }}/lone/product:latest
docker pull ${{ vars.REGISTRY }}/lone/admin:latest
docker pull ${{ vars.REGISTRY }}/lone/user:latest
docker pull ${{ vars.REGISTRY }}/lone/chore:latest
docker compose up -d
+34 -1
View File
@@ -11,11 +11,13 @@ on:
- "services/user/**"
- "services/ad/**"
- "services/chore/**"
- "services/sale/**"
- "rpc/product/**"
- "rpc/admin/**"
- "rpc/user/**"
- "rpc/ad/**"
- "rpc/chore/**"
- "rpc/sale/**"
- "pkg/**"
- ".gitea/workflows/ci.yml"
workflow_dispatch:
@@ -30,6 +32,7 @@ jobs:
user: ${{ steps.filter.outputs.user }}
ad: ${{ steps.filter.outputs.ad }}
chore: ${{ steps.filter.outputs.chore }}
sale: ${{ steps.filter.outputs.sale }}
steps:
- name: Checkout
uses: https://git.ailuowan.com/deploy/checkout@v4
@@ -45,6 +48,7 @@ jobs:
user=false
ad=false
chore=false
sale=false
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
bff=true
@@ -53,6 +57,7 @@ jobs:
user=true
ad=true
chore=true
sale=true
else
before="${{ github.event.before }}"
if [ -z "$before" ] || [ "$before" = "0000000000000000000000000000000000000000" ]; then
@@ -70,6 +75,7 @@ jobs:
echo "$changed" | grep -qE '^(services/user|rpc/user|pkg)/|^\.gitea/workflows/ci\.yml$' && user=true || true
echo "$changed" | grep -qE '^(services/ad|rpc/ad|pkg)/|^\.gitea/workflows/ci\.yml$' && ad=true || true
echo "$changed" | grep -qE '^(services/chore|rpc/chore|pkg)/|^\.gitea/workflows/ci\.yml$' && chore=true || true
echo "$changed" | grep -qE '^(services/sale|rpc/sale|pkg)/|^\.gitea/workflows/ci\.yml$' && sale=true || true
fi
echo "bff=$bff" >> "$GITHUB_OUTPUT"
@@ -78,7 +84,8 @@ jobs:
echo "user=$user" >> "$GITHUB_OUTPUT"
echo "ad=$ad" >> "$GITHUB_OUTPUT"
echo "chore=$chore" >> "$GITHUB_OUTPUT"
echo "bff=$bff product=$product admin=$admin user=$user ad=$ad chore=$chore"
echo "sale=$sale" >> "$GITHUB_OUTPUT"
echo "bff=$bff product=$product admin=$admin user=$user ad=$ad chore=$chore sale=$sale"
docker-bff:
needs: changes
@@ -232,6 +239,32 @@ jobs:
-t ${{ vars.REGISTRY }}/$NAME:latest \
.
- name: Docker push
run: |
docker push ${{ vars.REGISTRY }}/$NAME:latest
docker-sale:
needs: changes
if: needs.changes.outputs.sale == 'true'
runs-on: runner
env:
NAME: lone/sale
steps:
- name: Checkout
uses: https://git.ailuowan.com/deploy/checkout@v4
- name: Login Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ vars.REGISTRY }} -u "${{ vars.REGISTRY_USERNAME }}" --password-stdin
- name: Docker build
run: |
docker buildx use default
docker buildx build --builder default --load \
-f services/sale/Dockerfile \
-t ${{ vars.REGISTRY }}/$NAME:latest \
.
- name: Docker push
run: |
docker push ${{ vars.REGISTRY }}/$NAME:latest