Skip to content

Commit

Permalink
Update scribe-docker-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lavishiamops authored Nov 18, 2024
1 parent 2ffaf2a commit 69145e5
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/scribe-docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
build_preset: ["py311"]
platform: ["linux/amd64", "linux/arm64"]
fail-fast: false

steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
Expand All @@ -40,7 +41,27 @@ jobs:
--build_context_ref "${{ github.ref_name }}-${{ inputs.release_index }}" \
--platform ${{ matrix.platform }}
- name: List Docker Images
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Log in to Amazon ECR
id: ecr-login
run: |
aws ecr get-login-password --region ${{ secrets.AWS_REGION }} \
| docker login --username AWS --password-stdin "${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com"
- name: Tag Docker Image
run: |
IMAGE_TAG="${{ github.ref_name }}-${{ inputs.release_index }}-py311"
REPOSITORY="${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ secrets.ECR_REPOSITORY_NAME }}"
docker tag $IMAGE_TAG $REPOSITORY:$IMAGE_TAG
- name: Push Docker Image to ECR
run: |
echo "Listing all available Docker images:"
docker images
IMAGE_TAG="${{ github.ref_name }}-${{ inputs.release_index }}-py311"
REPOSITORY="${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ secrets.ECR_REPOSITORY_NAME }}"
docker push $REPOSITORY:$IMAGE_TAG

0 comments on commit 69145e5

Please sign in to comment.