Skip to content

Commit

Permalink
add workflow_dispatch to build
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Dec 17, 2024
1 parent 977ac5c commit 95c613d
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
env:
REGISTRY: ghcr.io
IMAGE_NAME:
${{ github.event_name != 'pull_request' && github.repository ||
'windmill-labs/windmill-test' }}
${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && github.repository || 'windmill-labs/windmill-test' }}
DEV_SHA:
${{ github.event_name != 'pull_request' && 'dev' || format('pr-{0}',
github.event.number) }}
${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && 'dev' || github.event.inputs.tag }}

name: Build windmill:main
on:
Expand All @@ -16,6 +14,17 @@ on:
types: [opened, synchronize, reopened]
paths:
- "Dockerfile"
workflow_dispatch:
inputs:
ee:
description: 'Build EE image (true, false)'
required: false
default: false
type: boolean
tag:
description: 'Tag the image'
required: true
default: 'test'

concurrency:
group: ${{ github.ref }}
Expand All @@ -26,10 +35,7 @@ permissions: write-all
jobs:
build:
runs-on: ubicloud
if:
(github.event_name != 'issue_comment') ||
(contains(github.event.comment.body, '/buildimage_all') ||
contains(github.event.comment.body, '/buildimage_base'))
if: (github.event_name != 'workflow_dispatch') || (github.event.inputs && !github.event.inputs.ee)
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -92,10 +98,7 @@ jobs:
build_ee:
runs-on: ubicloud
if:
(github.event_name != 'issue_comment') ||
(contains(github.event.comment.body, '/buildimage_ee') ||
contains(github.event.comment.body, '/buildimage_nsjail')) ||
contains(github.event.comment.body, '/buildimage_all')
(github.event_name != 'workflow_dispatch') || (github.event.inputs.ee)
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -450,10 +453,7 @@ jobs:
needs: [build_ee]
runs-on: ubicloud
if:
(github.event_name != 'issue_comment') || (github.event_name !=
'pull_request') || (contains(github.event.comment.body,
'/buildimage_nsjail') || contains(github.event.comment.body,
'/buildimage_all'))
(github.event_name != 'pull_request') && (github.event_name != 'workflow_dispatch')
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -546,7 +546,7 @@ jobs:
publish_ecr_s3:
needs: [build_ee_nsjail]
runs-on: ubicloud-standard-2-arm
if: github.event_name != 'pull_request'
if: (github.event_name != 'pull_request') && (github.event_name != 'workflow_dispatch')
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down

0 comments on commit 95c613d

Please sign in to comment.