Merge pull request #36 from Eshrath027/MK-1945 #56
Workflow file for this run
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: Publish Docker Image | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| push_to_ecr: | |
| name: Build, Push Docker Image | |
| runs-on: ubuntu-latest | |
| env: | |
| RELEASE_TAG: ${{ github.ref_name }} | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Set up AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_DEV_SECRET_ID }} | |
| aws-region: us-east-1 | |
| - name: Login to AWS ECR | |
| run: | | |
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/k9v9d5v2 | |
| - name: Build & Push image to Amazon ECR Public | |
| run: docker buildx build -f ./Dockerfile . --platform linux/arm64,linux/amd64 -t public.ecr.aws/k9v9d5v2/accuknox-aspm-scanner:$RELEASE_TAG --push |