From 09df88fe9d9889ac70a982e675fc7f86e8c3896d Mon Sep 17 00:00:00 2001 From: Eddie Gross <144722433+grosseddie@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:03:09 -0500 Subject: [PATCH 1/4] Create action.yml --- action.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 000000000..b0a11cd08 --- /dev/null +++ b/action.yml @@ -0,0 +1,32 @@ + +name: deploy my lambda + +on: + push: + branches: + - main + +jobs: + build: + runs-on: + step: + - 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 + - name: create zip + run: | + cd function + zip -r ../${{ github.sha }}.zip . + - name: archive artifact + uses: actions/upload-artifact@v2 + with: + name: zipped-bundle + path: ${{ github.sha }}.zip From f4f8b8159ffa94b0ed6f42c642f7a5ddabe2d638 Mon Sep 17 00:00:00 2001 From: Eddie Gross <144722433+grosseddie@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:39:47 -0500 Subject: [PATCH 2/4] Delete action.yml --- action.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 action.yml diff --git a/action.yml b/action.yml deleted file mode 100644 index b0a11cd08..000000000 --- a/action.yml +++ /dev/null @@ -1,32 +0,0 @@ - -name: deploy my lambda - -on: - push: - branches: - - main - -jobs: - build: - runs-on: - step: - - 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 - - name: create zip - run: | - cd function - zip -r ../${{ github.sha }}.zip . - - name: archive artifact - uses: actions/upload-artifact@v2 - with: - name: zipped-bundle - path: ${{ github.sha }}.zip From 97d110755cb5a693ba7bcee9c0b50d9680513bdf Mon Sep 17 00:00:00 2001 From: Eddie Gross <144722433+grosseddie@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:50:18 -0500 Subject: [PATCH 3/4] workflow --- .github/actions.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/actions.yml diff --git a/.github/actions.yml b/.github/actions.yml new file mode 100644 index 000000000..41d8da41d --- /dev/null +++ b/.github/actions.yml @@ -0,0 +1,32 @@ +name: Deploy my Lambda Function + +# trigger on all push events to main branch +on: + 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 + 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 ../${{ github.sha }}.zip . + - name: Archive artifact + uses: actions/upload-artifact@v2 + with: + name: zipped-bundle + path: ${{ github.sha }}.zip \ No newline at end of file From 99a7df1f536227b04e469962cf856f8d994a2738 Mon Sep 17 00:00:00 2001 From: Eddie Gross <144722433+grosseddie@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:57:46 -0500 Subject: [PATCH 4/4] test --- .github/actions.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions.yml b/.github/actions.yml index 41d8da41d..97a9a66b3 100644 --- a/.github/actions.yml +++ b/.github/actions.yml @@ -29,4 +29,6 @@ jobs: uses: actions/upload-artifact@v2 with: name: zipped-bundle - path: ${{ github.sha }}.zip \ No newline at end of file + path: ${{ github.sha }}.zip + + \ No newline at end of file