Skip to content

Commit

Permalink
Allow a custom entrypoint override
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruskal-google committed Mar 4, 2023
1 parent 07acee9 commit e0cacbb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ inputs:
required: false
description: "Skip staleness checks"
type: boolean
entrypoint:
required: false
description: "Specify a custom entrypoint for docker"
type: string

runs:
using: 'composite'
Expand All @@ -58,10 +62,15 @@ runs:
bazel-cache: regenerate-stale-files
bash: ./regenerate_stale_files.sh $BAZEL_FLAGS

- name: Generate docker flags
- name: Generate docker platform flags
if: inputs.platform
shell: bash
run: echo "DOCKER_RUN_FLAGS=--platform ${{inputs.platform}}" >> $GITHUB_ENV
run: echo "DOCKER_RUN_FLAGS=--platform ${{inputs.platform}} $DOCKER_RUN_FLAGS" >> $GITHUB_ENV

- name: Generate docker entrypoing flags
if: inputs.entrypoint
shell: bash
run: echo "DOCKER_RUN_FLAGS=--entrypoint ${{inputs.entrypoint}} $DOCKER_RUN_FLAGS " >> $GITHUB_ENV

- name: Run Docker
uses: ./../../_actions/current/internal/docker-run
Expand Down

0 comments on commit e0cacbb

Please sign in to comment.