Skip to content

Commit

Permalink
Separate docker-build-and-push workflow - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Saporetti Junior committed Jan 2, 2024
1 parent 39ac2e4 commit a6c27c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
inputs:
image_tag:
description: 'Docker Image Tag'
default: 'latest'
default: ''
required: true
type: string

Expand All @@ -28,7 +28,19 @@ permissions:

jobs:

detect-version:
outputs:
app_version:·${{·steps.detect-version.outputs.app_version·}}
steps:
- name: Detect Version
id: detect-version
run: |
appVersion=$(grep·-e·'^[0-9]+\.[0-9]+\.[0-9]+'·.VERSION)
echo "Application version: ${appVersion}"
echo·"app_version=$(echo·$appVersion)"·>>·$GITHUB_OUTPUT
build-docker-images:
needs: detect-version
strategy:
matrix:
os:
Expand All @@ -43,6 +55,7 @@ jobs:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_TAG: ${{ inputs.image_tag || needs.detect-version.outputs.app_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
Expand All @@ -61,4 +74,4 @@ jobs:
context: "docker/${{ matrix.docker-container }}"
file: "docker/${{ matrix.docker-container }}/Dockerfile"
push: true
tags: "${{ env.DOCKERHUB_USERNAME }}/hhs-${{ matrix.docker-container }}:${{ inputs.image_tag }}"
tags: "${{ env.DOCKERHUB_USERNAME }}/hhs-${{ matrix.docker-container }}:${{ env.IMAGE_TAG }}"
1 change: 0 additions & 1 deletion install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ Usage: $APP_NAME [OPTIONS] <args>
# Define python tools
PYTHON="${1}"
PIP="${2}"
python_minor="$(${PYTHON} -V | cut -d '.' -f2)"
echo -en "\n${WHITE}[$(basename "${PYTHON}")] Installing HSPyLib packages... "
pkgs=$(mktemp)
echo "${PYTHON_MODULES[*]}" | tr ' ' '\n' >"${pkgs}"
Expand Down

0 comments on commit a6c27c8

Please sign in to comment.