Skip to content

Commit

Permalink
adds github workflow to deploy bridge-prototype docker image
Browse files Browse the repository at this point in the history
pushes to 'bridge-prototype' branch will trigger a docker image deployment with
the 'bridge-prototype' tag
  • Loading branch information
hughy committed Sep 28, 2023
1 parent fc8c1f2 commit 5e7394d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy-bridge-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Bridge Prototype Node Docker Image
on:
push:
branches:
- bridge-prototype

permissions:
contents: read
packages: write

jobs:
Deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Login to GitHub Registry
run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_USER} --password-stdin ghcr.io
env:
GITHUB_USER: ${{ secrets.BREW_GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to AWS Registry
run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $AWS_REGISTRY_URL
env:
AWS_REGISTRY_URL: ${{ secrets.AWS_NODE_REGISTRY_URL }}

- name: Build Node Image
run: ./ironfish-cli/scripts/build-docker.sh

- name: Deploy Node Image to AWS:${{ github.ref_name }}
run: |
docker tag ironfish ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }}
docker push ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:${{ github.ref_name }}

0 comments on commit 5e7394d

Please sign in to comment.