-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (51 loc) · 1.91 KB
/
aws-oidc-deploy-test.yaml
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: aws_oidc deploy test
on:
workflow_dispatch: {}
pull_request:
branches:
- main
concurrency:
group: aws-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: read-all
jobs:
deploy:
runs-on: ubuntu-latest
env:
SKIP_TAG_CHECK: true
steps:
- name: Check out branch
uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install requests
run: pip install requests
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Resolve latest snapshot tag
run: source cloud/shared/bin/resolve-latest-snapshot-tag
- name: Copy the config from staging
run: |
# Grab the config from the staging deploy repo to confirm
# the changes work with actual data
curl https://raw.githubusercontent.com/civiform/civiform-staging-deploy/main/aws_staging_civiform_config.sh > civiform_config.sh
echo 'export CIVIFORM_MODE="test"' >> civiform_config.sh
echo 'export USE_LOCAL_BACKEND=true' >> civiform_config.sh
- name: Source config, set CIVIFORM_MODE to be "test", Run deploy with latest tag
run: |
export IMAGE_TAG="${LATEST_SNAPSHOT_TAG}"
cloud/shared/bin/deploy
exit $?
- name: Source config, set CIVIFORM_MODE to be "test", Run setup with latest tag
run: |
export TEST_CONFIG_CONTENT="export APP_PREFIX="$(git rev-parse --short HEAD)
echo $TEST_CONFIG_CONTENT >> civiform_config.sh
export IMAGE_TAG="${LATEST_SNAPSHOT_TAG}"
cloud/shared/bin/setup
exit $?