ci: 修改为手动触发Actions,默认关闭自动部署
This commit is contained in:
11
.github/workflows/docker-image.yml
vendored
11
.github/workflows/docker-image.yml
vendored
@@ -1,17 +1,12 @@
|
|||||||
name: Docker Build and Deploy
|
name: Docker Build and Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- 'docs/**'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
deploy:
|
deploy:
|
||||||
description: '是否部署'
|
description: '是否部署'
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
@@ -83,9 +78,7 @@ jobs:
|
|||||||
needs: [prepare, build]
|
needs: [prepare, build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
success() &&
|
success() && inputs.deploy
|
||||||
(github.ref == 'refs/heads/main' && github.event_name == 'push') ||
|
|
||||||
(github.event_name == 'workflow_dispatch' && inputs.deploy)
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code for prod compose file
|
- name: Checkout code for prod compose file
|
||||||
|
|||||||
Reference in New Issue
Block a user