feat: user items
This commit is contained in:
@@ -32,4 +32,5 @@ jobs:
|
|||||||
docker pull ${{ vars.REGISTRY }}/lone/bff:latest
|
docker pull ${{ vars.REGISTRY }}/lone/bff:latest
|
||||||
docker pull ${{ vars.REGISTRY }}/lone/product:latest
|
docker pull ${{ vars.REGISTRY }}/lone/product:latest
|
||||||
docker pull ${{ vars.REGISTRY }}/lone/admin:latest
|
docker pull ${{ vars.REGISTRY }}/lone/admin:latest
|
||||||
|
docker pull ${{ vars.REGISTRY }}/lone/user:latest
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|||||||
+32
-1
@@ -8,6 +8,7 @@ on:
|
|||||||
- "bff/**"
|
- "bff/**"
|
||||||
- "product/**"
|
- "product/**"
|
||||||
- "admin/**"
|
- "admin/**"
|
||||||
|
- "user/**"
|
||||||
- "pkg/**"
|
- "pkg/**"
|
||||||
- ".gitea/workflows/ci.yml"
|
- ".gitea/workflows/ci.yml"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -19,6 +20,7 @@ jobs:
|
|||||||
bff: ${{ steps.filter.outputs.bff }}
|
bff: ${{ steps.filter.outputs.bff }}
|
||||||
product: ${{ steps.filter.outputs.product }}
|
product: ${{ steps.filter.outputs.product }}
|
||||||
admin: ${{ steps.filter.outputs.admin }}
|
admin: ${{ steps.filter.outputs.admin }}
|
||||||
|
user: ${{ steps.filter.outputs.user }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://git.ailuowan.com/deploy/checkout@v4
|
uses: https://git.ailuowan.com/deploy/checkout@v4
|
||||||
@@ -31,11 +33,13 @@ jobs:
|
|||||||
bff=false
|
bff=false
|
||||||
product=false
|
product=false
|
||||||
admin=false
|
admin=false
|
||||||
|
user=false
|
||||||
|
|
||||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
bff=true
|
bff=true
|
||||||
product=true
|
product=true
|
||||||
admin=true
|
admin=true
|
||||||
|
user=true
|
||||||
else
|
else
|
||||||
before="${{ github.event.before }}"
|
before="${{ github.event.before }}"
|
||||||
if [ -z "$before" ] || [ "$before" = "0000000000000000000000000000000000000000" ]; then
|
if [ -z "$before" ] || [ "$before" = "0000000000000000000000000000000000000000" ]; then
|
||||||
@@ -50,12 +54,14 @@ jobs:
|
|||||||
echo "$changed" | grep -qE '^(bff|pkg)/|^\.gitea/workflows/ci\.yml$' && bff=true || true
|
echo "$changed" | grep -qE '^(bff|pkg)/|^\.gitea/workflows/ci\.yml$' && bff=true || true
|
||||||
echo "$changed" | grep -qE '^(product|pkg)/|^\.gitea/workflows/ci\.yml$' && product=true || true
|
echo "$changed" | grep -qE '^(product|pkg)/|^\.gitea/workflows/ci\.yml$' && product=true || true
|
||||||
echo "$changed" | grep -qE '^(admin|pkg)/|^\.gitea/workflows/ci\.yml$' && admin=true || true
|
echo "$changed" | grep -qE '^(admin|pkg)/|^\.gitea/workflows/ci\.yml$' && admin=true || true
|
||||||
|
echo "$changed" | grep -qE '^(user|pkg)/|^\.gitea/workflows/ci\.yml$' && user=true || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "bff=$bff" >> "$GITHUB_OUTPUT"
|
echo "bff=$bff" >> "$GITHUB_OUTPUT"
|
||||||
echo "product=$product" >> "$GITHUB_OUTPUT"
|
echo "product=$product" >> "$GITHUB_OUTPUT"
|
||||||
echo "admin=$admin" >> "$GITHUB_OUTPUT"
|
echo "admin=$admin" >> "$GITHUB_OUTPUT"
|
||||||
echo "bff=$bff product=$product admin=$admin"
|
echo "user=$user" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "bff=$bff product=$product admin=$admin user=$user"
|
||||||
|
|
||||||
docker-bff:
|
docker-bff:
|
||||||
needs: changes
|
needs: changes
|
||||||
@@ -131,3 +137,28 @@ jobs:
|
|||||||
- name: Docker push
|
- name: Docker push
|
||||||
run: |
|
run: |
|
||||||
docker push ${{ vars.REGISTRY }}/$NAME:latest
|
docker push ${{ vars.REGISTRY }}/$NAME:latest
|
||||||
|
|
||||||
|
docker-user:
|
||||||
|
needs: changes
|
||||||
|
if: needs.changes.outputs.user == 'true'
|
||||||
|
runs-on: runner
|
||||||
|
env:
|
||||||
|
NAME: lone/user
|
||||||
|
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 build --load \
|
||||||
|
-f user/Dockerfile \
|
||||||
|
-t ${{ vars.REGISTRY }}/$NAME:latest \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Docker push
|
||||||
|
run: |
|
||||||
|
docker push ${{ vars.REGISTRY }}/$NAME:latest
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user