-
Notifications
You must be signed in to change notification settings - Fork 568
38 lines (36 loc) · 1.38 KB
/
publish-environment.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
name: Publish execution environment
on:
workflow_call:
inputs:
destination_dir:
required: true
type: string
jobs:
publish-environment:
name: Publish execution environment
runs-on: ubuntu-latest
environment: deploy-prod
permissions:
id-token: write
contents: read
steps:
- name: Ensure `destination_dir` is not empty
if: ${{ inputs.destination_dir == '' }}
run: exit 1
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: yarn --immutable
- run: yarn build:lavamoat
- name: configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
role-session-name: ghactionssession
aws-region: ${{ vars.AWS_REGION }}
- name: Deploy to `${{ inputs.destination_dir }}` directory of remote storage
run: |
aws s3 cp ./packages/snaps-execution-environments/dist/browserify/iframe s3://${{ vars.AWS_BUCKET_NAME }}/iframe/${{ inputs.destination_dir }} --recursive --acl private
aws s3 cp ./packages/snaps-execution-environments/dist/browserify/webview s3://${{ vars.AWS_BUCKET_NAME }}/webview/${{ inputs.destination_dir }} --recursive --acl private