diff --git a/.github/action_templates/build-and-push/action.yaml b/.github/action_templates/build-and-push/action.yaml index 127ab12..8919893 100644 --- a/.github/action_templates/build-and-push/action.yaml +++ b/.github/action_templates/build-and-push/action.yaml @@ -14,6 +14,9 @@ inputs: dockerfile-name: description: 'The name of dockerfile to use' required: true + tag-name: + description: 'The name of tag for the image' + required: true runs: using: "composite" @@ -36,10 +39,11 @@ runs: with: context: ./docker file: ./docker/${{ inputs.dockerfile-name}} + build-args: tag_name=${{ inputs.tag-name}} push: true platforms: linux/arm64 tags: | - awiciroh/${{ inputs.image-name}}:latest + awiciroh/${{ inputs.image-name}}:${{ inputs.tag-name}} builder: mybuilder env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/docker_deps_image.yml b/.github/workflows/docker_deps_image.yml index a9f1985..05c2604 100644 --- a/.github/workflows/docker_deps_image.yml +++ b/.github/workflows/docker_deps_image.yml @@ -25,4 +25,5 @@ jobs: docker-auth-token: ${{ secrets.DOCKER_AUTH_TOKEN }} github-sha: ${{ github.sha }} image-name: "ngen-deps" - dockerfile-name: "Dockerfile.ngen-deps" \ No newline at end of file + dockerfile-name: "Dockerfile.ngen-deps" + tag-name: "tag-test" \ No newline at end of file diff --git a/.github/workflows/docker_troute_image.yml b/.github/workflows/docker_troute_image.yml index acc0f94..5e8a60e 100644 --- a/.github/workflows/docker_troute_image.yml +++ b/.github/workflows/docker_troute_image.yml @@ -24,6 +24,7 @@ jobs: github-sha: ${{ github.sha }} image-name: "t-route" dockerfile-name: "Dockerfile.t-route" + tag-name: "tag-test" on-failure: runs-on: self-hosted if: ${{ github.event.workflow_run.conclusion == 'failure' }} diff --git a/docker/Dockerfile.t-route b/docker/Dockerfile.t-route index f4c4767..d91c1a5 100644 --- a/docker/Dockerfile.t-route +++ b/docker/Dockerfile.t-route @@ -4,12 +4,13 @@ ARG TROUTE_REPO_URL=https://github.com/NOAA-OWP/t-route.git \ TROUTE_BRANCH=master \ TROUTE_COMMIT \ - WORKDIR=/ngen + WORKDIR=/ngen \ + TAG_NAME tag_name ################################################################################################################ ################################################################################################################ ##### Create intermediate Docker build stage for building t-route in Rocky Linux environment -FROM awiciroh/ngen-deps:latest as rocky_init_troute_repo +FROM awiciroh/ngen-deps:$TAG_NAME as rocky_init_troute_repo ARG TROUTE_REPO_URL \ TROUTE_BRANCH \ TROUTE_COMMIT \ @@ -27,7 +28,7 @@ RUN cd ${WORKDIR} \ ################################################################################################################ ################################################################################################################ ##### Create intermediate Docker build stage for building t-route in Rocky Linux environment -FROM awiciroh/ngen-deps:latest as rocky_build_troute +FROM awiciroh/ngen-deps:$TAG_NAME as rocky_build_troute ARG REPO_URL \ BRANCH \