Skip to content

Commit

Permalink
Merge pull request #21 from RaphvK/image-name
Browse files Browse the repository at this point in the history
Enforce lower-case image name in GitHub Action
  • Loading branch information
lreiher authored Mar 26, 2024
2 parents 4dd021d + 75fff18 commit fae0f2c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ runs:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3

- name: Enforce lower-case image name
id: image-name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ inputs.image-name }}

- name: Enforce lower-case dev image name
id: dev-image-name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ inputs.dev-image-name }}

- name: Build images
id: build-images
shell: bash
Expand All @@ -182,9 +194,9 @@ runs:
TARGET: ${{ inputs.target }}
BASE_IMAGE: ${{ inputs.base-image }}
COMMAND: ${{ inputs.command }}
IMAGE_NAME: ${{ inputs.image-name }}
IMAGE_NAME: ${{ steps.image-name.outputs.lowercase }}
IMAGE_TAG: ${{ inputs.image-tag }}
DEV_IMAGE_NAME: ${{ inputs.dev-image-name }}
DEV_IMAGE_NAME: ${{ steps.dev-image-name.outputs.lowercase }}
DEV_IMAGE_TAG: ${{ inputs.dev-image-tag }}
RMW_IMPLEMENTATION: ${{ inputs.rmw-implementation }}
ROS_DISTRO: ${{ inputs.ros-distro }}
Expand Down Expand Up @@ -239,7 +251,7 @@ runs:
TARGET: ${{ inputs.target }}
BASE_IMAGE: ${{ inputs.base-image }}
COMMAND: ${{ inputs.command }}
IMAGE_NAME: ${{ inputs.image-name }}
IMAGE_NAME: ${{ steps.image-name.outputs.lowercase }}
IMAGE_TAG: ${{ inputs.image-tag }}
DEV_IMAGE_NAME: ${{ inputs.dev-image-name }}
DEV_IMAGE_TAG: ${{ inputs.dev-image-tag }}
Expand Down Expand Up @@ -275,7 +287,7 @@ runs:
TARGET: ${{ inputs.target }}
BASE_IMAGE: ${{ inputs.base-image }}
COMMAND: ${{ inputs.command }}
IMAGE_NAME: ${{ inputs.image-name }}
IMAGE_NAME: ${{ steps.image-name.outputs.lowercase }}
IMAGE_TAG: latest
DEV_IMAGE_NAME: ${{ inputs.dev-image-name }}
DEV_IMAGE_TAG: latest-dev
Expand Down

0 comments on commit fae0f2c

Please sign in to comment.