Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 07c0d32

Browse files
committed
cicd-testing
1 parent 83b4c61 commit 07c0d32

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.github/workflows/master.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ jobs:
2828
name: UAT Release
2929
uses: ./.github/workflows/release.yml
3030
needs: [ build-test ]
31-
if: github.ref == 'refs/heads/master'
31+
# Todo Remove After testing
32+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/cf-cicd'
3233
permissions:
3334
contents: read
3435
id-token: write
3536
with:
3637
environment: uat
38+
aws-region: us-east-1
39+
aws-role-arn: arn:aws:iam::722264665990:role/OIDCGithubProviderRoleMetamaskHome
40+
aws-bucket-name: stage.home.metamask.io
41+
cloudfront-distribution-id: E1RY04JD0H4SYF
3742

3843
release-prd:
3944
name: PRD Release

.github/workflows/release.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ on:
55
required: true
66
description: Environment name
77
type: string
8+
aws-region:
9+
required: true
10+
description: AWS region
11+
type: string
12+
default: us-east-1
13+
aws-role-arn:
14+
required: true
15+
description: AWS role ARN
16+
type: string
17+
aws-bucket-name:
18+
required: true
19+
description: AWS S3 bucket name
20+
type: string
21+
cloudfront-distribution-id:
22+
required: true
23+
description: AWS CloudFront distribution ID
24+
type: string
825
jobs:
926
deploy:
1027
name: Deploy
@@ -16,15 +33,15 @@ jobs:
1633
# v4.0.1
1734
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
1835
with:
19-
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
20-
role-session-name: ghactionssession
21-
aws-region: ${{ vars.AWS_REGION }}
36+
role-to-assume: ${{ inputs.aws-role-arn }}
37+
role-session-name: github-actions
38+
aws-region: ${{ inputs.aws-region }}
2239
- name: download build artifact
2340
uses: actions/download-artifact@v3
2441
with:
2542
name: build
2643
path: ./build/
2744
- name: Deploy website
2845
run: |
29-
aws s3 cp ./build/ s3://${{ vars.AWS_BUCKET_NAME }}/ --recursive --acl private
30-
aws cloudfront create-invalidation --distribution-id ${{ vars.AWS_CF_DISTRIBUTION_ID }} --paths "/"
46+
aws s3 cp ./build/ s3://${{ inputs.aws-bucket-name }}/ --recursive --acl private
47+
aws cloudfront create-invalidation --distribution-id ${{ inputs.cloudfront-distribution-id }} --paths "/"

0 commit comments

Comments
 (0)