Skip to content

Commit 78326a8

Browse files
committed
Use version passed as input
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
1 parent b949744 commit 78326a8

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.github/workflows/baseimage.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ concurrency:
66
group: 'service-base'
77
cancel-in-progress: true
88

9-
# Controls when the action will run.
109
on:
11-
# Allows you to run this workflow manually from the Actions tab
1210
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version tag for the images'
14+
required: false
15+
default: 'latest'
16+
type: string
1317

14-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1518
jobs:
1619
docker-build:
1720
runs-on: ubuntu-latest
@@ -46,15 +49,13 @@ jobs:
4649
env:
4750
DOCKER_CLI_HINTS: false
4851
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
49-
- name: Login to Docker Hub
50-
uses: docker/login-action@v3
51-
with:
52-
username: hardcoreeng
53-
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
52+
VERSION: ${{ inputs.version }}
53+
5454
- name: Publish base image
5555
env:
5656
DOCKER_CLI_HINTS: false
5757
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
58+
VERSION: ${{ inputs.version }}
5859
run: |
5960
echo Pushing base image
6061
cd ./dev/base-image

dev/base-image/build.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22

3-
docker build -t hardcoreeng/base -f base.Dockerfile ${DOCKER_EXTRA} .
4-
docker build -t hardcoreeng/rekoni-base -f rekoni.Dockerfile ${DOCKER_EXTRA} .
5-
docker build -t hardcoreeng/print-base -f print.Dockerfile ${DOCKER_EXTRA} .
6-
docker build -t hardcoreeng/front-base -f front.Dockerfile ${DOCKER_EXTRA} .
3+
# Default version if not set
4+
VERSION=${VERSION:-"latest"}
5+
6+
docker build -t hardcoreeng/base:${VERSION} -f base.Dockerfile ${DOCKER_EXTRA} .
7+
docker build -t hardcoreeng/rekoni-base:${VERSION} -f rekoni.Dockerfile ${DOCKER_EXTRA} .
8+
docker build -t hardcoreeng/print-base:${VERSION} -f print.Dockerfile ${DOCKER_EXTRA} .
9+
docker build -t hardcoreeng/front-base:${VERSION} -f front.Dockerfile ${DOCKER_EXTRA} .

0 commit comments

Comments
 (0)