-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.64 KB
/
pulumi-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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Pulumi Deploy
on:
push:
paths:
- 'todo-app/**'
branches:
- main # Trigger on push to the main branch
jobs:
pulumi-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
repository-projects: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4 # More information on this action can be found below in the 'AWS Credentials' section
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
role-session-name: GithubActionsSession
- name: Install Dependencies
working-directory: todo-app
run: |
pip install -r requirements.txt
- name: Configure Pulumi
working-directory: todo-app
run: |
pulumi stack select ExitoLab/todo-app/dev --non-interactive || pulumi stack init ExitoLab/todo-app/dev
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- name: Pulumi Preview
working-directory: todo-app
run: |
pulumi stack select ExitoLab/todo-app/dev
pulumi preview
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- name: Pulumi Up
working-directory: todo-app
run: |
pulumi stack select ExitoLab/todo-app/dev
pulumi up --yes
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}