Skip to content

Commit

Permalink
feat: allow manual trigger CI without deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Mar 15, 2024
1 parent f85d953 commit 9b31303
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
inputs:
deploy:
type: boolean
description: Whether to deploy the build images
jobs:
build:
if: "!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]'))"
Expand Down Expand Up @@ -60,5 +64,5 @@ jobs:
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push $TAG:$VERSION
docker push $TAG:latest
if: "github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')"
if: "github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.deploy))"

0 comments on commit 9b31303

Please sign in to comment.