Skip to content

Commit

Permalink
correction de deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainArd committed Jul 6, 2024
1 parent 5299e81 commit 45815ec
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,21 @@ jobs:
- name: Build with Maven
run: mvn clean package

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Log in to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
region: us-east-1
run: |
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com
- name: Build, tag, and push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com
ECR_REPOSITORY: hello-world
IMAGE_TAG: ${{ github.sha }}
run: |
Expand All @@ -52,4 +58,4 @@ jobs:
distribution: 'adopt' # Vous pouvez aussi utiliser 'zulu' ou 'temurin' selon vos préférences

- name: Run tests with Maven
run: mvn test
run: mvn test

0 comments on commit 45815ec

Please # to comment.