diff --git a/.github/workflows/baseimage.yaml b/.github/workflows/baseimage.yaml index ac4979acbe..0c21b5225a 100644 --- a/.github/workflows/baseimage.yaml +++ b/.github/workflows/baseimage.yaml @@ -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 diff --git a/dev/base-image/build.sh b/dev/base-image/build.sh index 1b44c57875..af4155d29c 100755 --- a/dev/base-image/build.sh +++ b/dev/base-image/build.sh @@ -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} . \ No newline at end of file +# 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} . \ No newline at end of file