Skip to content

Commit

Permalink
Merge branch 'skeleton2.0' of https://github.com/RENCI/TerriaMap into…
Browse files Browse the repository at this point in the history
… skeleton2.0
  • Loading branch information
scrummish committed Jul 24, 2023
2 parents 53adf2e + 046192e commit 3fe7840
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/aws-ecr-load.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: 2022 Renaissance Computing Institute. All rights reserved.
# SPDX-FileCopyrightText: 2023 Renaissance Computing Institute. All rights reserved.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-License-Identifier: LicenseRef-RENCI
# SPDX-License-Identifier: MIT

name: Publish an input docker image to the AWS ECR with the version specified

on:
workflow_dispatch:
inputs:
in_container:
description: "this is the name of the input image (image:version)"
required: true
version:
description: "this is the image version (only) that will be used in AWS/ECR"
required: true

# job definition
jobs:
Build-and-publish-image:
runs-on: ubuntu-latest
permissions:
contents: read

# job steps
steps:
# pull the docker image, latest is presumed
- name: pull the docker image
id: pull-it
run: docker pull containers.renci.org/eds/${{ github.event.inputs.in_container }}

# list the images for confirmation
- name: list images 1
run: docker images

# push the image to AWS/ECR
- name: Push to ECR
id: ecr
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-2
local-image: containers.renci.org/eds/${{ github.event.inputs.in_container }}
image: ${{ github.event.inputs.in_container }}, ${{ github.event.inputs.in_container }}:${{ github.event.inputs.version }}
11 changes: 11 additions & 0 deletions .github/workflows/image-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,14 @@ jobs:
tags: |
${{ env.REGISTRY }}:latest
${{ env.REGISTRY }}:${{ steps.get_version.outputs.VERSION }}
# push the image to AWS/ECR
- name: Push the built image to the AWS/ECR registry
id: ecr
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-2
local-image: ${{ env.REGISTRY }}:${{ steps.get_version.outputs.VERSION }}
image: apsviz-terria-map:latest, apsviz-terria-map:${{ steps.get_version.outputs.VERSION }}

0 comments on commit 3fe7840

Please sign in to comment.