From b333f20e4f67c15fbad6d677847c7d6f3a778bdd Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:11:38 +0530 Subject: [PATCH 01/18] Create action.yml --- .github/workflows/action.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/workflows/action.yml diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 000000000..4efc6bfbe --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,5 @@ +name: Deploy by lamba function +on: + push: + branches: + - main From 6caee2d977be3c3edeea9394da017e71fc87a8a9 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:34:01 +0530 Subject: [PATCH 02/18] Update action.yml --- .github/workflows/action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 4efc6bfbe..31205328b 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -3,3 +3,23 @@ on: push: branches: - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: check out code + - uses: actions/checout@v2 + - name: set up python + - uses: actions/setup-python@v2 + with: + python -version: 3.8 + - name: install libraries + run: | + cd function + python -m pip install --upgrade pip + if[ -f requirements.txt.]; then pip install -r requirements.txt -t.; fi + - name: create zip bundle + run: | + cd function + zip -r ../ + From 4191e81e42b7a3bdf15a0b008f7aa7631c413033 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:35:19 +0530 Subject: [PATCH 03/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 31205328b..6163c524d 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -21,5 +21,5 @@ jobs: - name: create zip bundle run: | cd function - zip -r ../ + zip -r ../${{githun.sha}}.zip . From bdfa3be859a99feac4f1b60a427eaa87d5f31b35 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:40:06 +0530 Subject: [PATCH 04/18] Update action.yml --- .github/workflows/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6163c524d..080ad80b5 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -21,5 +21,11 @@ jobs: - name: create zip bundle run: | cd function - zip -r ../${{githun.sha}}.zip . + zip -r ../${{github.sha}}.zip . + - name: Archieve artifacts + - uses: actions/upload-artifacts@v2 + with: + name: zipped-bundle + path: ${{github.shga}}.zip + From d147bc92645d65ec2f4a0ed8110814557e934388 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:40:34 +0530 Subject: [PATCH 05/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 080ad80b5..6c568054b 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -26,6 +26,6 @@ jobs: - uses: actions/upload-artifacts@v2 with: name: zipped-bundle - path: ${{github.shga}}.zip + path: ${{github.sha}}.zip From b3cb3c90083aea39e230a76d2a40db52fb8ab8c8 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:43:19 +0530 Subject: [PATCH 06/18] Delete .github/workflows/init.yaml --- .github/workflows/init.yaml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/workflows/init.yaml diff --git a/.github/workflows/init.yaml b/.github/workflows/init.yaml deleted file mode 100644 index 95482ee7a..000000000 --- a/.github/workflows/init.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# This is a placeholder so actions won't default to a getting started page - -name: Placeholder - -on: push - -jobs: - init: - runs-on: ubuntu-latest - steps: - - name: Run a one-line script - run: echo Hello, world! From d75cbe1989dfb2addf90267082b3479bfebfa062 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:43:55 +0530 Subject: [PATCH 07/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6c568054b..e7efdf5e1 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -17,7 +17,7 @@ jobs: run: | cd function python -m pip install --upgrade pip - if[ -f requirements.txt.]; then pip install -r requirements.txt -t.; fi + if[ -f requirements.txt.]; then pip install -r requirements.txt -t .; fi - name: create zip bundle run: | cd function From 27df52649344fc28c3d068d2c2131ef055b243a5 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:49:27 +0530 Subject: [PATCH 08/18] Update action.yml --- .github/workflows/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index e7efdf5e1..6ac21a971 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: check out code - - uses: actions/checout@v2 + - uses: actions/checkout@v2 - name: set up python - uses: actions/setup-python@v2 with: @@ -17,15 +17,15 @@ jobs: run: | cd function python -m pip install --upgrade pip - if[ -f requirements.txt.]; then pip install -r requirements.txt -t .; fi + if[ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi - name: create zip bundle run: | cd function - zip -r ../${{github.sha}}.zip . - - name: Archieve artifacts - - uses: actions/upload-artifacts@v2 + zip -r ../${{ github.sha }}.zip . + - name: Archieve artifact + - uses: actions/upload-artifact@v2 with: name: zipped-bundle - path: ${{github.sha}}.zip + path: ${{ github.sha }}.zip From bc157432aaf44bcd52752988aff094f2505a7380 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 18:50:51 +0530 Subject: [PATCH 09/18] Update action.yml --- .github/workflows/action.yml | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6ac21a971..83f69ce9b 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,31 +1,33 @@ -name: Deploy by lamba function +name: Deploy my Lambda Function + +# trigger on all push events to main branch on: - push: - branches: - - main -jobs: + push: + branches: + - main + +jobs: build: - runs-on: ubuntu-latest - steps: - - name: check out code - - uses: actions/checkout@v2 - - name: set up python - - uses: actions/setup-python@v2 + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 with: - python -version: 3.8 - - name: install libraries + python-version: 3.8 + - name: Install libraries run: | - cd function - python -m pip install --upgrade pip - if[ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi - - name: create zip bundle + cd function + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi + - name: Create zip bundle run: | - cd function - zip -r ../${{ github.sha }}.zip . - - name: Archieve artifact - - uses: actions/upload-artifact@v2 + cd function + zip -r ../${{ github.sha }}.zip . + - name: Archive artifact + uses: actions/upload-artifact@v2 with: - name: zipped-bundle - path: ${{ github.sha }}.zip - + name: zipped-bundle + path: ${{ github.sha }}.zip From e55d5849a3f92364d7b0fdea0062d51d7f0a373c Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 19:02:30 +0530 Subject: [PATCH 10/18] Update action.yml From ecb09e767364e314e7c1eafc65225c246f9d4753 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 19:06:02 +0530 Subject: [PATCH 11/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 83f69ce9b..a721294f8 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -26,7 +26,7 @@ jobs: cd function zip -r ../${{ github.sha }}.zip . - name: Archive artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: zipped-bundle path: ${{ github.sha }}.zip From 6002648096035de3e0916cbc0e3758b9b794a6c2 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Mon, 23 Dec 2024 19:09:24 +0530 Subject: [PATCH 12/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index a721294f8..2f7b70c3a 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Check out code uses: actions/checkout@v2 From 3bdccf5f7c9e4107564ce1a2e30b03808d2d81db Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:08:28 +0530 Subject: [PATCH 13/18] Update action.yml --- .github/workflows/action.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 2f7b70c3a..dc1489bf8 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -30,4 +30,21 @@ jobs: with: name: zipped-bundle path: ${{ github.sha }}.zip - +upload: + runs-on: ubuntu-latest + needs: build + steps: + - name: download artifacts + uses: actions/download-artifact@v2 + with: + name: zipped-bundle + - name: configure aws CLI + uses: aws-actions/configure-aws-credentrial@v1 + with: + aws-access-key-id : ${{ secret.AWS_ACCESS_KEY }} + aws-access-secret-key : ${{ secret.AWS_ACCESS_SECRET_KEY }} + aws-region: us-east-1 + - name: upload artifacts to s3 + run: aws s3 cp ${{ github.sha }}.zip s3://jayasriawsbucket/${{ github.sha }} + + From 3920f11458f6c462fdf1ca73452c2a806f3e7ae4 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:12:25 +0530 Subject: [PATCH 14/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index dc1489bf8..a8c7118fe 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -39,7 +39,7 @@ upload: with: name: zipped-bundle - name: configure aws CLI - uses: aws-actions/configure-aws-credentrial@v1 + uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id : ${{ secret.AWS_ACCESS_KEY }} aws-access-secret-key : ${{ secret.AWS_ACCESS_SECRET_KEY }} From 8208490453c64872ae8efce92cecf20a00e4b8eb Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:15:19 +0530 Subject: [PATCH 15/18] Update action.yml --- .github/workflows/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index a8c7118fe..77c9a583d 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -41,8 +41,8 @@ upload: - name: configure aws CLI uses: aws-actions/configure-aws-credentials@v1 with: - aws-access-key-id : ${{ secret.AWS_ACCESS_KEY }} - aws-access-secret-key : ${{ secret.AWS_ACCESS_SECRET_KEY }} + aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY }} + aws-access-secret-key : ${{ secrets.AWS_ACCESS_SECRET_KEY }} aws-region: us-east-1 - name: upload artifacts to s3 run: aws s3 cp ${{ github.sha }}.zip s3://jayasriawsbucket/${{ github.sha }} From b4b9f61493340bf631343c1c3ace7049b8d50ee1 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:21:14 +0530 Subject: [PATCH 16/18] Update action.yml --- .github/workflows/action.yml | 51 ++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 77c9a583d..ace48d3f1 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,6 +1,6 @@ name: Deploy my Lambda Function -# trigger on all push events to main branch +# Trigger on all push events to the main branch on: push: branches: @@ -12,39 +12,46 @@ jobs: steps: - name: Check out code uses: actions/checkout@v2 + - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.8 + - name: Install libraries run: | - cd function - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi + cd function + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi + - name: Create zip bundle run: | - cd function - zip -r ../${{ github.sha }}.zip . + cd function + zip -r ../${{ github.sha }}.zip . + - name: Archive artifact uses: actions/upload-artifact@v3 with: name: zipped-bundle path: ${{ github.sha }}.zip -upload: - runs-on: ubuntu-latest - needs: build - steps: - - name: download artifacts - uses: actions/download-artifact@v2 - with: - name: zipped-bundle - - name: configure aws CLI - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY }} - aws-access-secret-key : ${{ secrets.AWS_ACCESS_SECRET_KEY }} - aws-region: us-east-1 - - name: upload artifacts to s3 - run: aws s3 cp ${{ github.sha }}.zip s3://jayasriawsbucket/${{ github.sha }} + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + name: zipped-bundle + + - name: Configure AWS CLI + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET_KEY }} + aws-region: us-east-1 + + - name: Upload artifacts to S3 + run: aws s3 cp ${{ github.sha }}.zip s3://jayasriawsbucket/${{ github.sha }} From 3179ed5f4a8fa5dc0079dc435ba09800e2ed7e90 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:29:14 +0530 Subject: [PATCH 17/18] Update action.yml --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index ace48d3f1..641bbc2a3 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 From 8801d929d092e6d97216e0efbde8e25aff4a8d93 Mon Sep 17 00:00:00 2001 From: Jsri01 Date: Sat, 11 Jan 2025 21:30:23 +0530 Subject: [PATCH 18/18] Update action.yml --- .github/workflows/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 641bbc2a3..e830a9cd6 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -30,7 +30,7 @@ jobs: zip -r ../${{ github.sha }}.zip . - name: Archive artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zipped-bundle path: ${{ github.sha }}.zip @@ -40,7 +40,7 @@ jobs: needs: build steps: - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: zipped-bundle