-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.75 KB
/
init-EB-app.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Manual deployment to fresh EB app
on:
# Can be manually run or called by other workflows
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build deployment assets
uses: me-julian/games-not-played/.github/workflows/build.yml@main
secrets: inherit
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
id-token: write
steps:
# Download app package to upload to EB
# eb-app-package.zip extracts to games-not-played.zip
- name: Download EB package artifact
uses: actions/download-artifact@v4
with:
name: eb-app-package
# Configure AWS Credentials
- name: Configure AWS Credentials
id: get-aws-creds
uses: aws-actions/configure-aws-credentials@v4
with:
unset-current-credentials: true
role-to-assume: arn:aws:iam::173624809884:role/GithubActionsAutomator
aws-region: us-east-2
output-credentials: true
# Login to AWS ECR
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registries: '173624809884'
mask-password: 'true'
# Deploy app to EB
- name: Deploy app to EB
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ steps.get-aws-creds.outputs.aws-access-key-id }}
aws_secret_key: ${{ steps.get-aws-creds.outputs.aws-secret-access-key }}
application_name: games-not-played
environment_name: games-not-played-env
version_label: games-not-played-${{ needs.build.outputs.version-tag }}
region: us-east-2
deployment_package: games-not-played.zip
use_existing_version_if_available: 'true'