Use version passed as input

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-01-13 19:07:54 +07:00
parent b949744500
commit 78326a8179
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2
2 changed files with 16 additions and 12 deletions

View File

@ -6,12 +6,15 @@ concurrency:
group: 'service-base'
cancel-in-progress: true
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
description: 'Version tag for the images'
required: false
default: 'latest'
type: string
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker-build:
runs-on: ubuntu-latest
@ -46,15 +49,13 @@ jobs:
env:
DOCKER_CLI_HINTS: false
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: hardcoreeng
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
VERSION: ${{ inputs.version }}
- name: Publish base image
env:
DOCKER_CLI_HINTS: false
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
VERSION: ${{ inputs.version }}
run: |
echo Pushing base image
cd ./dev/base-image

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash
docker build -t hardcoreeng/base -f base.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/rekoni-base -f rekoni.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/print-base -f print.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/front-base -f front.Dockerfile ${DOCKER_EXTRA} .
# Default version if not set
VERSION=${VERSION:-"latest"}
docker build -t hardcoreeng/base:${VERSION} -f base.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/rekoni-base:${VERSION} -f rekoni.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/print-base:${VERSION} -f print.Dockerfile ${DOCKER_EXTRA} .
docker build -t hardcoreeng/front-base:${VERSION} -f front.Dockerfile ${DOCKER_EXTRA} .