Skip to content

Commit

Permalink
Moved aws get parameter next to configure credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Fazith Maheen Abubacker committed Dec 20, 2023
1 parent 1c460b7 commit c0a66d8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ jobs:
id-token: write
# if: github.ref == 'refs/heads/main'
steps:
- name: Retrieve Parameters - ssm parameter store
id: getParameters
run: |
# Replace '--path' with your specific path from Parameter Store
bucket=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-bucket" --query 'Parameter.Value' --output text)
distribution_id=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-cloudfront-distribution-id" --query 'Parameter.Value' --output text)
echo "BUCKET=$bucket" >> "$GITHUB_ENV"
echo "DISTRIBUTION_ID=$distribution_id" >> "$GITHUB_ENV"
- uses: actions/download-artifact@v4
with:
name: build
Expand All @@ -66,6 +57,15 @@ jobs:
aws-region: ap-southeast-2
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC_AODNPRTALV2

- name: Retrieve Parameters - ssm parameter store
id: getParameters
run: |
# Replace '--path' with your specific path from Parameter Store
bucket=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-bucket" --query 'Parameter.Value' --output text)
distribution_id=$(aws ssm get-parameter --name "/core/aodn-portal-v2/dev-cloudfront-distribution-id" --query 'Parameter.Value' --output text)
echo "BUCKET=$bucket" >> "$GITHUB_ENV"
echo "DISTRIBUTION_ID=$distribution_id" >> "$GITHUB_ENV"
- name: Copy files to the production website with the AWS CLI
run: |
Expand Down

0 comments on commit c0a66d8

Please sign in to comment.