Skip to content

Commit 487c81a

Browse files
authored
Update deploy.yml
1 parent a0b25e7 commit 487c81a

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
# Add a comment with the S3 preview link
6060
PR_NUMBER=${{ github.event.pull_request.number }}
61-
COMMENT="Preview your changes at: http://ai4sdlcmd.ai4sdlc.pub.aws.mitre.org/mergeRequest/${PR_NUMBER}/index.html"
61+
COMMENT="Preview your changes at: http://${{ secrets.S3_BUCKET_NAME }}/mergeRequest/${PR_NUMBER}/index.html"
6262
curl -X POST \
6363
-H "Authorization: token $GITHUB_TOKEN" \
6464
-H "Accept: application/vnd.github+json" \
@@ -150,8 +150,7 @@ jobs:
150150
aws-region: us-east-1
151151
- name: Deploy to Test Environment
152152
env:
153-
#S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
154-
S3_BUCKET_NAME: ai4sdlcmd.ai4sdlc.pub.aws.mitre.org
153+
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
155154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156155
run: |
157156
PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls"
@@ -169,12 +168,12 @@ jobs:
169168
runs-on: ubuntu-latest
170169
if: github.ref == 'refs/heads/main' # Run for main branch
171170
steps:
172-
- name: Configure AWS credentials
173-
uses: aws-actions/configure-aws-credentials@v4
171+
- name: configure aws credentials
172+
uses: aws-actions/configure-aws-credentials@v1.7.0
174173
with:
175-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
176-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
177-
aws-region: us-east-1 # change if needed
174+
role-to-assume: arn:aws:iam::677043464939:role/GitHubAction-AssumeRoleWithAction
175+
role-session-name: GitHub_to_AWS_via_FederatedOIDC
176+
aws-region: us-east-1
178177
- name: Get PR number from GitHub API
179178
id: pr
180179
run: |

0 commit comments

Comments
 (0)