github.com/matrixorigin/matrixone@v0.7.0/.github/actions/ecr/action.yaml (about) 1 name: ecr 2 description: "push image to ecr" 3 inputs: 4 tag: 5 description: "image tag" 6 required: true 7 default: "latest" 8 repo: 9 description: "ecr repo" 10 required: true 11 default: "matrixone" 12 region: 13 description: "aws region of ecr" 14 required: true 15 default: "us-east-1" 16 role: 17 description: "ecr push role" 18 required: true 19 default: "" 20 alias: 21 description: "ecr public repo alias" 22 required: true 23 default: "p4n7f8j9" 24 25 runs: 26 using: "composite" 27 28 # ref: https://github.com/aws-actions/amazon-ecr-login 29 steps: 30 - name: Set up QEMU 31 uses: docker/setup-qemu-action@master 32 with: 33 image: tonistiigi/binfmt:latest 34 platforms: linux/amd64,linux/arm64 35 36 - name: Set up Docker Buildx 37 id: buildx 38 uses: docker/setup-buildx-action@v1 39 40 # github OIDC https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services 41 - name: Configure AWS credentials 42 uses: aws-actions/configure-aws-credentials@v1 # More information on this action can be found below in the 'AWS Credentials' section 43 with: 44 role-to-assume: ${{ inputs.role }} 45 aws-region: ${{ inputs.region }} 46 47 - name: Login to Amazon ECR 48 id: login-ecr-public 49 uses: aws-actions/amazon-ecr-login@v1 50 with: 51 registry-type: public 52 53 - name: Build, tag, and push docker image to Amazon ECR Public 54 shell: bash 55 env: 56 REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} 57 REGISTRY_ALIAS: ${{ inputs.alias }} 58 REPOSITORY: ${{ inputs.repo }} 59 IMAGE_TAG: ${{ inputs.tag }} 60 run: | 61 docker buildx build --platform linux/arm64,linux/amd64 -f ./optools/images/Dockerfile -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG --push .