Skip to content

Commit

Permalink
Try building arm64 docker on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dguenther committed May 3, 2024
1 parent 54a7482 commit aeed185
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test-deploy-node-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Node Docker Image
on:
push

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

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

- 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.sha }}
if: ${{ inputs.aws_tag_git_sha }}
run: |
docker tag ironfish ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:multi
docker push ${{ secrets.AWS_NODE_REGISTRY_URL }}/ironfish:multi
8 changes: 8 additions & 0 deletions ironfish-cli/scripts/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ echo "Building Docker Image"
export DOCKER_BUILDKIT=1

docker build . \
--platform linux/amd64,linux/arm64 \
--progress plain \
--tag ironfish:latest \
--file ironfish-cli/Dockerfile

docker run \
--platform linux/amd64 \
--interactive \
--rm \
ironfish:latest --version

docker run \
--platform linux/arm64 \
--interactive \
--rm \
ironfish:latest --version

0 comments on commit aeed185

Please sign in to comment.