Docker Base Image Build (AMD) #17
This file contains hidden or 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 (AMD) | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Docker Base Image Build (ARM)"] | |
| types: | |
| - completed | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: hamdysimplyblock | |
| password: ${{ secrets.DOCKER_PASS }} | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| 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: | | |
| docker build -t simplyblock/spdk-core:base_image_amd64 \ | |
| -t public.ecr.aws/simply-block/spdk-core:base_image_amd64 -f docker/Dockerfile_spdk_base . --push | |
| - name: Create the manifest | |
| run: | | |
| DH_ARM="simplyblock/spdk-core:base_image_arm64" | |
| DH_AMD="simplyblock/spdk-core:base_image_amd64" | |
| ECR_ARM="public.ecr.aws/simply-block/spdk-core:base_image_arm64" | |
| ECR_AMD="public.ecr.aws/simply-block/spdk-core:base_image_amd64" | |
| docker manifest create simplyblock/spdk-core:base_image "$DH_ARM" "$DH_AMD" | |
| docker manifest annotate simplyblock/spdk-core:base_image "$DH_ARM" --arch arm64 | |
| docker manifest annotate simplyblock/spdk-core:base_image "$DH_AMD" --arch amd64 | |
| docker manifest push simplyblock/spdk-core:base_image | |
| docker manifest create public.ecr.aws/simply-block/spdk-core:base_image "$ECR_ARM" "$ECR_AMD" | |
| docker manifest annotate public.ecr.aws/simply-block/spdk-core:base_image "$ECR_ARM" --arch arm64 | |
| docker manifest annotate public.ecr.aws/simply-block/spdk-core:base_image "$ECR_AMD" --arch amd64 | |
| docker manifest push public.ecr.aws/simply-block/spdk-core:base_image |