-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add concurrency config on deploy.yaml (#151)
- Loading branch information
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ on: | |
- common | ||
|
||
jobs: | ||
deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -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: | ||
|