Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,30 @@ jobs:
- name: Build Docker image
run: docker buildx build --platform linux/arm64 --provenance=false -t stockwatch .

terraform-plan:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::992550705663:role/stockwatch-github-actions-terraform
aws-region: us-east-1

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3

- name: Terraform Init
working-directory: infra
run: terraform init

- name: Terraform Plan
working-directory: infra
env:
TF_VAR_anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
run: terraform plan
3 changes: 2 additions & 1 deletion infra/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ resource "aws_iam_role" "github_actions_terraform" {
"token.actions.githubusercontent.com:aud" = "sts.amazonaws.com"
}
StringLike = {
"token.actions.githubusercontent.com:sub" = "repo:medysaly/stockwatch:*"
"token.actions.githubusercontent.com:sub" = "repo:medysaly@187324769/stockwatch@1304130972:*"

}
}
}
Expand Down
Loading