-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.43 KB
/
Copy pathdeploy-to-dev.yml
File metadata and controls
46 lines (43 loc) · 1.43 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
42
43
44
45
46
name: Deploy automatically to development environment
on:
push:
branches:
- main
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
jobs:
deploy:
name: Deploy to AWS dev environment
environment: dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Pulumi Configurations Unit Tests
run: dotnet test ./VirtualFinland.Infrastructure.UnitTests --no-restore
- name: Get IAM role from Pulumi
uses: Virtual-Finland-Development/pulumi-outputs-action@v2
id: infra-iam-role
with:
organization: virtualfinland
project: infrastructure
stack: dev
resource: DeployerIAMRole
access-token: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ steps.infra-iam-role.outputs.resource-output }}
role-session-name: infrastructure-deployer
- uses: pulumi/actions@v5
with:
work-dir: ./VirtualFinland.Infrastructure
command: up
stack-name: ${{ secrets.PULUMI_ORGANIZATION }}/dev
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN}}