Skip to content

Commit

Permalink
add commit id
Browse files Browse the repository at this point in the history
  • Loading branch information
benlee0423 committed Nov 19, 2023
1 parent b7af6fd commit 04b11b4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
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 @@ -17,6 +17,9 @@ inputs:
tag-name:
description: 'The name of tag for the image'
required: true
commit-id:
description: 'Commit to be used in the target repo'
required: false

runs:
using: "composite"
Expand All @@ -39,7 +42,8 @@ runs:
with:
context: ./docker
file: ./docker/${{ inputs.dockerfile-name}}
build-args: TAG_NAME=${{ inputs.tag-name}}
build-args: |
TAG_NAME=${{ inputs.tag-name}}, COMMIT_ID=${{ inputs.commit-id}}
push: true
platforms: linux/arm64
tags: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker_ngen_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
image-name: "ngen"
dockerfile-name: "Dockerfile.ngen"
tag-name: "tag-test"
commit-id: "7551590"
on-failure:
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker_troute_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
image-name: "t-route"
dockerfile-name: "Dockerfile.t-route"
tag-name: "tag-test"
commit-id: "a0ff6cf"
on-failure:
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.ngen
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ ARG NGEN_BUILD_CONFIG_TYPE="Release" \
################################################################################################################
################################################################################################################
##### Create intermediate Docker build stage for building framework in Rocky Linux environment
ARG COMMIT_ID
ARG COMMIT=${COMMIT_ID}
FROM awiciroh/ngen-deps:${TAG_NAME} as rocky_init_repo
ARG REPO_URL \
BRANCH \
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.t-route
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ARG TROUTE_REPO_URL=https://github.com/NOAA-OWP/t-route.git \
################################################################################################################
################################################################################################################
##### Create intermediate Docker build stage for building t-route in Rocky Linux environment
ARG COMMIT_ID
ARG TROUTE_COMMIT=${COMMIT_ID}
ARG TAG_NAME
FROM awiciroh/ngen-deps:${TAG_NAME} as rocky_init_troute_repo
ARG TROUTE_REPO_URL \
Expand Down

0 comments on commit 04b11b4

Please sign in to comment.