Skip to content

Commit

Permalink
Set inputs to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
YisDav committed Sep 30, 2024
1 parent d9d2b70 commit b5ac3e0
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/Procedure_push_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ name: Push Docker Images
on:
workflow_dispatch:
inputs:
IMAGE_TAG:
image_tag:
description: 'Docker image tag'
default: '4.10.0'
required: true
DOCKER_REFERENCE:
docker_reference:
description: 'wazuh-docker reference'
default: 'v4.10.0'
required: false
PRODUCTS:
products:
description: 'Comma-separated list of the image names to build and push'
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
required: true
FILEBEAT_MODULE_VERSION:
filebeat_module_version:
description: 'Filebeat module version'
required: true
REVISION:
revision:
description: 'Package revision'
default: '1'
required: true
PUSH_IMAGES:
push_images:
description: 'Push images'
type: boolean
default: true
Expand All @@ -34,31 +34,31 @@ on:
required: false
workflow_call:
inputs:
IMAGE_TAG:
image_tag:
description: 'Docker image tag'
default: '4.10.0'
required: true
type: string
DOCKER_REFERENCE:
docker_reference:
description: 'wazuh-docker reference'
default: 'v4.10.0'
required: false
type: string
PRODUCTS:
products:
description: 'Comma-separated list of the image names to build and push'
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
required: true
type: string
FILEBEAT_MODULE_VERSION:
filebeat_module_version:
description: 'Filebeat module version'
required: true
type: string
REVISION:
revision:
description: 'Package revision'
default: '1'
required: true
type: string
PUSH_IMAGES:
push_images:
description: 'Push images'
type: boolean
default: true
Expand All @@ -84,18 +84,18 @@ jobs:
echo "Inputs provided:"
echo "---------------------------------------------"
echo "* id: ${{ inputs.id }}"
echo "* IMAGE_TAG: ${{ inputs.IMAGE_TAG }}"
echo "* DOCKER_REFERENCE: ${{ inputs.DOCKER_REFERENCE }}"
echo "* PRODUCTS: ${{ inputs.PRODUCTS }}"
echo "* FILEBEAT_MODULE_VERSION: ${{ inputs.FILEBEAT_MODULE_VERSION }}"
echo "* REVISION: ${{ inputs.REVISION }}"
echo "* PUSH_IMAGES: ${{ inputs.PUSH_IMAGES }}"
echo "* image_tag: ${{ inputs.image_tag }}"
echo "* docker_reference: ${{ inputs.docker_reference }}"
echo "* products: ${{ inputs.products }}"
echo "* filebeat_module_version: ${{ inputs.filebeat_module_version }}"
echo "* revision: ${{ inputs.revision }}"
echo "* push_images: ${{ inputs.push_images }}"
echo "---------------------------------------------"
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.DOCKER_REFERENCE }}
ref: ${{ inputs.docker_reference }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand All @@ -111,10 +111,9 @@ jobs:
- name: Build Wazuh images
run: |
IMAGE_TAG=${{ inputs.IMAGE_TAG }}
FILEBEAT_MODULE_VERSION=${{ inputs.FILEBEAT_MODULE_VERSION }}
REVISION=${{ inputs.REVISION }}
PUSH_IMAGES=${{ inputs.PUSH_IMAGES }}
IMAGE_TAG=${{ inputs.image_tag }}
FILEBEAT_MODULE_VERSION=${{ inputs.filebeat_module_version }}
REVISION=${{ inputs.revision }}
if [[ "$IMAGE_TAG" == *"-"* ]]; then
IFS='-' read -r -a tokens <<< "$IMAGE_TAG"
Expand All @@ -129,8 +128,9 @@ jobs:
./build-docker-images/build-images.sh -v $IMAGE_TAG -r $REVISION -f $FILEBEAT_MODULE_VERSION
fi
# Save .env file (generated by build-images.sh) contents to $GITHUB_ENV
ENV_FILE_PATH=".env"
# Save .env file contents to $GITHUB_ENV
if [ -f $ENV_FILE_PATH ]; then
while IFS= read -r line || [ -n "$line" ]; do
echo "$line" >> $GITHUB_ENV
Expand All @@ -142,10 +142,10 @@ jobs:
- name: Tag and Push Wazuh images
if: ${{ inputs.PUSH_IMAGES }}
if: ${{ inputs.push_images }}
run: |
IMAGE_TAG=${{ inputs.IMAGE_TAG }}
IMAGE_NAMES=${{ inputs.PRODUCTS }}
IMAGE_TAG=${{ inputs.image_tag }}
IMAGE_NAMES=${{ inputs.products }}
IFS=',' read -r -a images <<< "$IMAGE_NAMES"
for image in "${images[@]}"; do
echo "Tagging and pushing wazuh/$image:${WAZUH_VERSION} to wazuh/$image:$IMAGE_TAG"
Expand Down

0 comments on commit b5ac3e0

Please sign in to comment.