Skip to content

Commit

Permalink
feat: add concurrency config on deploy.yaml (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozline authored Jan 5, 2025
1 parent d210ada commit 617884d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
- common

jobs:
deploy:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -37,6 +37,15 @@ jobs:
run: |
cd $GITHUB_WORKSPACE && bash ./hack/image-build-and-push.sh ${{ github.event.inputs.service }}
deploy:
runs-on: ubuntu-latest
needs: build # 确保在 build 作业完成后再执行

concurrency: # 限制这个 job 只能同时运行一个
group: ${{ github.event.inputs.service }} # 使用服务名作为组标识符
cancel-in-progress: false # 允许多个相同服务的作业排队

steps:
- name: SSH and deploy on server
uses: appleboy/[email protected]
with:
Expand Down

0 comments on commit 617884d

Please sign in to comment.