-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (55 loc) · 1.97 KB
/
deploy-dev.yml
File metadata and controls
62 lines (55 loc) · 1.97 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CDK Deploy Dev Workflow 🚀
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy'
required: true
default: 'develop'
pull_request:
types: [labeled, synchronize]
jobs:
deploy:
name: Deploy to dev 🚀
runs-on: ubuntu-latest
environment: dev
if: >
github.event_name != 'pull_request' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-dev'))
steps:
- name: Determine branch to deploy
id: set_branch
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "branch=${{ github.event.inputs.branch }}" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "pull_request" ]; then
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
else
echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.set_branch.outputs.branch }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.deploy_role_arn }}
role-session-name: test-deploy
aws-region: us-west-2
- name: Run titiler-cmr deployment
uses: "./.github/actions/cdk-deploy"
with:
dir: "./infrastructure/aws"
env_aws_secret_name: ""
env:
EARTHDATA_USERNAME: ${{ vars.earthdata_username }}
EARTHDATA_PASSWORD: ${{ secrets.earthdata_password }}
STAGE: ${{ vars.stage }}
TITILER_CMR_AWS_REQUEST_PAYER: ${{ vars.titiler_cmr_aws_request_payer }}
TITILER_CMR_ROLE_ARN: ${{ secrets.titiler_cmr_role_arn }}
TITILER_CMR_ROOT_PATH: ''
TITILER_CMR_S3_AUTH_STRATEGY: ${{ vars.titiler_cmr_s3_auth_strategy }}