-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (40 loc) · 1.48 KB
/
deployment.yml
File metadata and controls
41 lines (40 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deployment
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker images
run: |
docker build -t martstech/aeon-gateway -f src/ApiGateway/Dockerfile .
docker build -t martstech/aeon-catalog -f src/Services/Catalog/Dockerfile .
docker build -t martstech/aeon-bookmarks -f src/Services/Bookmarks/Dockerfile .
- name: Push Docker images
run: |
docker push martstech/aeon-gateway
docker push martstech/aeon-catalog
docker push martstech/aeon-bookmarks
- name: Generate Deployment Package
run: zip -r deploy.zip . -x '*.git*'
- name: Deploy to Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: ${{ secrets.AWS_APP_NAME }}
environment_name: ${{ secrets.AWS_ENV_NAME }}
region: ${{ secrets.AWS_REGION }}
existing_bucket_name: ${{ secrets.AWS_BUCKET_NAME }}
version_label: ${{ github.sha }}
deployment_package: deploy.zip
use_existing_version_if_available: true