Skip to content

Commit

Permalink
Add publish packages option to docker build action
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Feb 13, 2024
1 parent 36c1f89 commit 1fa5c2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ runs:
uses: docker/bake-action@v3
with:
# Checking event_name for https://github.com/autowarefoundation/autoware/issues/2796
push: ${{ github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch || github.event_name == 'push'}}
push: ${{ github.event_name == 'schedule' || github.ref_name == github.event.repository.default_branch || github.event_name == 'push' || github.event.inputs.publish_packages }}
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
schedule:
- cron: 0 0 1,15 * *
workflow_dispatch:
inputs:
publish_packages:
description: 'Publish packages to GitHub Package Registry'
required: true
default: false
type: boolean

jobs:
docker-build-and-push-main-self-hosted:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
schedule:
- cron: 0 0 1,15 * *
workflow_dispatch:
inputs:
publish_packages:
description: 'Publish packages to GitHub Package Registry'
required: true
default: false
type: boolean

jobs:
docker-build-and-push-main:
Expand Down

0 comments on commit 1fa5c2b

Please sign in to comment.