Skip to content

Commit

Permalink
gh-actions/docker/registry: Fix inputs (#807)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Sep 2, 2023
1 parent 001abd5 commit 8c01256
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions gh-actions/docker/registry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ runs:
- run: |
docker run \
-d \
-p ${{ parameters.port }}:5000 \
-p ${{ inputs.port }}:5000 \
--restart always \
--name ${{ parameters.name }} \
${{ parameters.windows != true && parameters.image || parameters.windows_image }}
--name ${{ inputs.name }} \
${{ inputs.windows != true && inputs.image || inputs.windows_image }}
shell: bash
- run: |
if [[ -z "${{ parameters.as }}" ]]; then
IMAGE_NAME="$(echo "${{ parameters.load }}" | cut -d/ -f2-)"
if [[ -z "${{ inputs.as }}" ]]; then
IMAGE_NAME="$(echo "${{ inputs.load }}" | cut -d/ -f2-)"
else
IMAGE_NAME="${{ parameters.as }}"
IMAGE_NAME="${{ inputs.as }}"
fi
docker tag "${{ parameters.load }}" "localhost:${{ parameters.port }}/${IMAGE_NAME}"
docker push "localhost:${{ parameters.port }}/${IMAGE_NAME}"
docker tag "${{ inputs.load }}" "localhost:${{ inputs.port }}/${IMAGE_NAME}"
docker push "localhost:${{ inputs.port }}/${IMAGE_NAME}"
shell: bash
if: ${{ parameters.load != '' }}
if: ${{ inputs.load != '' }}

0 comments on commit 8c01256

Please sign in to comment.