Skip to content

Commit

Permalink
add tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
benlee0423 committed Nov 18, 2023
1 parent 43918eb commit 0f3353a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/action_templates/build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker_deps_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
dockerfile-name: "Dockerfile.ngen-deps"
tag-name: "tag-test"
1 change: 1 addition & 0 deletions .github/workflows/docker_troute_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.t-route
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 0f3353a

Please sign in to comment.