Skip to content

Commit

Permalink
Merge pull request #18 from aminbenmansour/fix/go-ci-trigger
Browse files Browse the repository at this point in the history
Fix pipelines' triggers
  • Loading branch information
aminbenmansour authored Dec 31, 2023
2 parents a1e3112 + 9a0e83f commit 7e42f70
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
push:
branches: [ "main" ]
pull_request:
branches:
- dd

jobs:
build:
if: ! startsWith(github.head_ref, 'refs/heads/iac/')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: "Terraform Plan"

on:
pull_request:
branches:
- "iac/*"
paths:
- "**.tf"

env:
TF_CLOUD_ORGANIZATION: "am1n-org"
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
main.zip
.terraform
.terraform.lock.hcl

main.zip
2 changes: 1 addition & 1 deletion infrastructure/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "aws_iam_role" "lambda_exec" {
resource "aws_lambda_permission" "api_gw" {
statement_id = "AllowExecutionFromAPIGateway"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.hello_world.function_name
function_name = aws_lambda_function.go_serverless.function_name
principal = "apigateway.amazonaws.com"

source_arn = "${aws_apigatewayv2_api.lambda.execution_arn}/*/*"
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output "lambda_bucket_name" {
output "function_name" {
description = "Name of the Lambda function."

value = aws_lambda_function.hello_world.function_name
value = aws_lambda_function.go_serverless.function_name
}

output "base_url" {
Expand Down

0 comments on commit 7e42f70

Please sign in to comment.