-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (34 loc) · 1.08 KB
/
lightsail-deploy.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
name: Deploy Lightsail Container
on:
push:
branches:
- lightsail-deploy
pull_request:
branches:
- lightsail-deploy
jobs:
configure-aws-credentials:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
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: Verify AWS credential
run: |
aws sts get-caller-identity
- name: Install AWS Lightsail plugin
run: |
sudo curl "https://s3.us-west-2.amazonaws.com/lightsailctl/latest/linux-amd64/lightsailctl" -o "/usr/local/bin/lightsailctl"
sudo chmod +x /usr/local/bin/lightsailctl
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker container
run: |
service_name="diaspora-service"
container_name="$service_name-container"
echo $service_name
echo $container_name
docker build -t $container_name -f Dockerfile .