Skip to content

Commit

Permalink
chore(github): setup Github oidc
Browse files Browse the repository at this point in the history
  • Loading branch information
eahefnawy committed Oct 14, 2024
1 parent d5b0f1b commit d137395
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
cmd: |
yq -i '.stages.prod.params.customDomainName = "${{ vars.CUSTOM_DOMAIN_NAME }}"' serverless-compose.yml
yq -i '.stages.prod.params.customDomainCertificateARN = "${{ vars.CUSTOM_DOMAIN_CERTIFICATE_ARN }}"' serverless-compose.yml
- name: Serverless Deploy
- name: Configure AWS Credentials - Serverless Marketing AWS Account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::488110005556:role/GithubActionsDeploymentRole
aws-region: us-east-1
- name: Serverless Deploy - Prod
uses: serverless/github-action@v4
with:
args: deploy --stage prod
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
9 changes: 6 additions & 3 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: serverless deploy
- name: Configure AWS Credentials - Serverless Marketing AWS Account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::488110005556:role/GithubActionsDeploymentRole
aws-region: us-east-1
- name: Serverless Deploy - PR Preview
uses: serverless/github-action@v4
with:
args: deploy --stage pr-${{ github.event.pull_request.number }}
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
9 changes: 6 additions & 3 deletions .github/workflows/pr-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ jobs:
cache: "npm"
- name: Install dependencies
run: npm ci
- name: serverless remove
- name: Configure AWS Credentials - Serverless Marketing AWS Account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::488110005556:role/GithubActionsDeploymentRole
aws-region: us-east-1
- name: Serverless Remove - PR Preview
uses: serverless/github-action@v4
with:
args: remove --stage pr-${{ github.event.pull_request.number }}
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 comments on commit d137395

Please sign in to comment.