From eb094afe1abfc97b1983db17b2a43aa20182ee6f Mon Sep 17 00:00:00 2001 From: Hugh Cunningham Date: Tue, 13 Aug 2024 14:07:19 -0700 Subject: [PATCH] supports deploying branch-named Docker images to AWS adds a workflow input for `AWS:{BRANCH}` and adds a deploy step for deploying the branch-named image to our AWS ECR repository --- .github/workflows/deploy-node-docker-image.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/deploy-node-docker-image.yml b/.github/workflows/deploy-node-docker-image.yml index 08e9922184..aa82644504 100644 --- a/.github/workflows/deploy-node-docker-image.yml +++ b/.github/workflows/deploy-node-docker-image.yml @@ -25,6 +25,10 @@ on: description: 'AWS:{GIT_SHA}' type: boolean default: false + aws_tag_git_branch: + description: 'AWS:{BRANCH}' + type: boolean + default: false permissions: contents: read @@ -116,6 +120,13 @@ jobs: docker tag ironfish ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }} docker push ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }} + # Used to deploy images for specific branches + - name: Deploy Node Image to AWS:${{ github.ref_name }} + if: ${{ inputs.aws_tag_git_branch && github.ref_type == 'branch' }} + run: | + docker tag ironfish ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }} + docker push ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }} + - name: Deploy Node Image to AWS:testnet if: ${{ inputs.aws_tag_testnet }} run: |