soutrik commited on
Commit
4c0bcea
1 Parent(s): 9e1c398

added env in GHA

Browse files
Files changed (1) hide show
  1. .github/workflows/main_cd.yml +11 -2
.github/workflows/main_cd.yml CHANGED
@@ -66,10 +66,19 @@ jobs:
66
  id: login-ecr
67
  uses: aws-actions/amazon-ecr-login@v2
68
 
 
 
 
 
 
 
 
 
 
69
  - name: Run Docker Compose for all services
70
  run: |
71
- docker-compose build --no-cache
72
- docker-compose up -d
73
  docker-compose logs --follow train eval
74
  docker-compose down --remove-orphans
75
 
 
66
  id: login-ecr
67
  uses: aws-actions/amazon-ecr-login@v2
68
 
69
+ - name: Create .env file
70
+ run: |
71
+ echo "HYDRA_FULL_ERROR=1" >> .env
72
+ echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> .env
73
+ echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> .env
74
+ echo "AWS_REGION=${{ secrets.AWS_REGION }}" >> .env
75
+ echo "::add-mask::${{ secrets.AWS_ACCESS_KEY_ID }}"
76
+ echo "::add-mask::${{ secrets.AWS_SECRET_ACCESS_KEY }}"
77
+
78
  - name: Run Docker Compose for all services
79
  run: |
80
+ docker-compose --env-file .env build --no-cache
81
+ docker-compose --env-file .env up -d
82
  docker-compose logs --follow train eval
83
  docker-compose down --remove-orphans
84