Skip to content

Commit 6d360b8

Browse files
committed
ci: update easy panel deploy for docker ci
1 parent 919de35 commit 6d360b8

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/docker.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ jobs:
2525
# - codebuild-arda-credit-${{ github.run_id }}-${{ github.run_attempt }} image:ubuntu-7.0 instance-size:2xlarge
2626
strategy:
2727
matrix:
28-
service: [frontend, backend]
28+
include:
29+
- service: frontend
30+
deploy_token_secret: EASYPANEL_DEPLOY_TOKEN_FRONTEND
31+
- service: backend
32+
deploy_token_secret: EASYPANEL_DEPLOY_TOKEN_BACKEND
2933
permissions:
3034
contents: read
3135
packages: write
@@ -91,9 +95,10 @@ jobs:
9195
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_BASE }}/${{ env.REPO_NAME }}-${{ matrix.service }}:latest
9296
cache-to: type=inline
9397

94-
deploy-easypanel:
95-
needs: build-and-push
96-
if: github.ref == 'refs/heads/main'
97-
uses: ./.github/workflows/easypanel.yml
98-
secrets:
99-
EASYPANEL_DEPLOY_TOKEN: ${{ secrets.EASYPANEL_DEPLOY_TOKEN }}
98+
- name: Trigger Easypanel Deployment for ${{ matrix.service }}
99+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
100+
env:
101+
DEPLOY_TOKEN: ${{ secrets[matrix.deploy_token_secret] }}
102+
run: |
103+
curl -X POST \
104+
https://panel.arda.xyz/api/deploy/$DEPLOY_TOKEN

0 commit comments

Comments
 (0)