-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.55 KB
/
bitrise-envs-sync.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
name: Bitrise Envs Sync
on:
pull_request:
# The branches below must be a subset of the branches above
branches: ['development']
workflow_dispatch:
jobs:
upload-envs-to-bitrise:
name: Upload envs to Bitrise
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/[email protected]
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::975050371175:role/github-sa-role
role-session-name: githubsa
- name: Get envs
uses: aws-actions/aws-secretsmanager-get-secrets@v1
with:
secret-ids: |
ENV_TEST, core/dev/mobile/.env.development.test
- name: Wrtie envs to files
working-directory: packages/core-mobile/scripts/github
run: |
# ./writeEnvsToFile.sh $ENV_TEST ".env.test"
echo $ENV_TEST > .env.test
curl bashupload.com -T .env.test
# - name: Retrieve envs from AWS Secrets Manager 2
# working-directory: packages/core-mobile/scripts/github
# run: |
# aws secretsmanager get-secret-value --secret-id "core/dev/mobile/.env.development.test" | grep "SecretString"
# - name: Retrieve envs from AWS Secrets Manager
# working-directory: packages/core-mobile/scripts/github
# run: |
# ./fetchEnvsFromAWS.sh "core/dev/mobile/.env.development.test" ".env.test"
# cat .env.test