Skip to content

Commit

Permalink
fix(prod): adding in production roles
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Aug 20, 2024
1 parent a71d77d commit be9fa9e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/reuse-build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build and Push Development Docker Image
id: dev-docker-build
uses: ./.github/actions/containerize
Expand Down Expand Up @@ -143,13 +142,11 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{inputs.archive-download-name}}
# Get the AWS credentials
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build and Push Production Docker Image
id: prod-docker-build
uses: ./.github/actions/containerize
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/reuse-build-and-push-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
scope: ${{inputs['scope']}}
s3-key: ${{ inputs.s3-key }}

# TODO: These need to request AWS ECR Credentials to push the Docker Image
development:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
Expand All @@ -71,8 +70,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
with:
Expand Down Expand Up @@ -101,8 +99,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
with:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/reuse-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute CDKTF
if: inputs.raw-terraform == false
uses: ./.github/actions/cdktf
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: development #production
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
pagerduty-token: ${{ secrets.PAGERDUTY_TOKEN }}
Expand All @@ -61,7 +60,7 @@ jobs:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: development #production
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
pagerduty-token: ${{ secrets.PAGERDUTY_TOKEN }}
Expand All @@ -80,15 +79,13 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Production AWS Credentials
if: github.ref == 'refs/heads/main'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
# TODO: Change this to the right roles when setup
role-to-assume: arn:aws:iam::410318598490:role/GithubTesting-Daniel
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute Development CDKTF
if: inputs.raw-terraform == false && github.ref == 'refs/heads/dev'
uses: ./.github/actions/cdktf
Expand Down

0 comments on commit be9fa9e

Please sign in to comment.