Docker Base Image Build #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Base Image Build | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: hamdysimplyblock | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_HAMDI }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_HAMDI }} | |
aws-region: us-east-1 | |
- name: Login to ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
with: | |
registry-type: public | |
- name: Build & Push | |
run: | | |
SHORT_SHA=$(echo ${{ env.SHA }} | head -c 8) | |
sudo apt-get update -y | |
sudo apt-get install -y qemu-system qemu-user-static | |
docker buildx ls | |
docker buildx create --name mybuilder --bootstrap --use | |
docker buildx build --platform linux/amd64,linux/arm64 -t simplyblock/simplyblock:base_image \ | |
-t public.ecr.aws/simply-block/simplyblock:base_image -f docker/Dockerfile_base . --push |