-
Notifications
You must be signed in to change notification settings - Fork 647
36 lines (34 loc) · 1.35 KB
/
publish-environment.yml
File metadata and controls
36 lines (34 loc) · 1.35 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
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
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: true
- 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/webpack/iframe s3://${{ vars.AWS_BUCKET_NAME }}/iframe/${{ inputs.destination_dir }} --recursive --acl private
aws s3 cp ./packages/snaps-execution-environments/dist/webpack/webview s3://${{ vars.AWS_BUCKET_NAME }}/webview/${{ inputs.destination_dir }} --recursive --acl private