Skip to content

Commit

Permalink
lambda added
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjilbhuiyan committed May 16, 2024
1 parent 4673857 commit f24dfce
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 38 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ jobs:
fetch-depth: 0
# Checkout the source code from the repository

# - name: Setup Golang
# id: setup_golang
# uses: actions/[email protected]
# with:
# go-version: '1.20'
# # Set up the Go environment
- name: Setup Golang
id: setup_golang
uses: actions/[email protected]
with:
go-version: '1.20'
# Set up the Go environment

# - name: action-zip
# uses: montudor/[email protected]
# # Zip the source code
- name: action-zip
uses: montudor/[email protected]
# Zip the source code

# - name: Setting up change file detection action
# id: changed-files-specific
# uses: tj-actions/changed-files@v42.0.2
# with:
# base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
# files: |
# **/*.go
# json: "true"
# # Detect any changes in the Go files
- name: Setting up change file detection action
id: changed-files-specific
uses: tj-actions/changed-files@v44
with:
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
files: |
**/*.go
json: "true"
# Detect any changes in the Go files

# - name: Run step if any file(s) in the integration folder change
# if: steps.changed-files-specific.outputs.any_changed == 'true'
# run: |
# echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
# echo "${{ steps.changed-files-specific.outputs.all_changed_files }}" > list.txt
# cp ../.github/scripts/golang-build-deploy.sh .
# bash golang-build-deploy.sh
# # Execute build and deploy script if any Go files have changed
- name: Run step if any file(s) in the integration folder change
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
echo "${{ steps.changed-files-specific.outputs.all_changed_files }}" > list.txt
cp ../.github/scripts/golang-build-deploy.sh .
bash golang-build-deploy.sh
# Execute build and deploy script if any Go files have changed

- name: Setup Terraform
id: Setting_up_terraform
Expand Down
2 changes: 1 addition & 1 deletion lambda/github-lambda-test-1/src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ func handler(ctx context.Context) (string, error) {

func main() {
lambda.Start(handler)
}
}
2 changes: 1 addition & 1 deletion lambda/github-lambda-test-2/src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ func handler(ctx context.Context) (string, error) {

func main() {
lambda.Start(handler)
}
}
20 changes: 10 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# # Define module for golang-lambda-1
# module "golang-lambda-1" {
# source = "./lambda/github-lambda-test-1"
# s3_bucket = module.golang-lambda-bucket.s3-bucket-function_name
# }
# Define module for golang-lambda-1
module "golang-lambda-1" {
source = "./lambda/github-lambda-test-1"
s3_bucket = module.golang-lambda-bucket.s3-bucket-function_name
}

# # Define module for golang-lambda-2
# module "golang-lambda-2" {
# source = "./lambda/github-lambda-test-2"
# s3_bucket = module.golang-lambda-bucket.s3-bucket-function_name
# Define module for golang-lambda-2
module "golang-lambda-2" {
source = "./lambda/github-lambda-test-2"
s3_bucket = module.golang-lambda-bucket.s3-bucket-function_name

# }
}

# Define module for golang-lambda-bucket
module "golang-lambda-bucket" {
Expand Down

0 comments on commit f24dfce

Please sign in to comment.