Skip to content

Commit

Permalink
change ec2 pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ajithvcoder committed Nov 3, 2024
1 parent 8b0500e commit bea81dd
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/ec2-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-south-1

- name: Authenticate Docker to ECR
run: |
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 306093656765.dkr.ecr.ap-south-1.amazonaws.com
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Pull Docker image from ECR
run: |
Expand All @@ -62,11 +62,8 @@ jobs:
dvc pull -r myremote && \
dvc repro train
"
- name: Cleanup
if: always() # This ensures it runs even if previous steps fail
env:
REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Clean previous images and containers
run: |
cml runner destroy --name=session-08 --cloud=aws
docker system prune -f

0 comments on commit bea81dd

Please sign in to comment.