From 9baf9be0f8d1fc496263cbfbb794432292e80e8d Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Thu, 17 Apr 2025 02:42:43 -0700 Subject: [PATCH] Image build (#5) * Remove obsolete Lambda packaging script and related configuration files - Deleted `package_lambda.py` script responsible for packaging AWS Lambda functions and layers. - Removed `pip.conf` configuration file for pip settings. - Eliminated `requirements.txt` file that specified Python dependencies. - Deleted `test_payload.json` used for testing Lambda functions. - Removed empty JSON and TFVAR files in `varfiles` directory. - Deleted `variables.tf` file containing Terraform variable definitions. - Removed `versions.tf` file specifying Terraform version requirements. - Added new GitHub Actions workflow for building and pushing Lambda container images using Packer. - Introduced `packer.pkr.hcl` file for Packer configuration to build Docker images for Lambda. * Refactor GitHub API integration to remove Census-specific references and improve configuration handling * Update Python setup in build workflow to use actions/setup-python@v4 and improve dependency installation * Add Terraform backend configuration for GCS storage * Add GOOGLE_CREDENTIALS environment variable to build workflow * Remove unused PACKER_GITHUB_API_TOKEN from build workflow environment * updating build --------- Co-authored-by: Dave Arnold --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f303f3..3d45304 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,8 @@ on: workflow_dispatch: push: branches: [ "main" ] + pull_request: + branches: [ "main" ] permissions: contents: write @@ -38,7 +40,7 @@ jobs: with: python-version: '3.11' cache: 'pip' - cache-dependency-path: requirements.txt + cache-dependency-path: gtag_requirements.txt - name: Install gtag dependencies run: | @@ -74,6 +76,9 @@ jobs: uses: aws-actions/amazon-ecr-login@v2 with: mask-password: true + registry-type: public + env: + AWS_REGION: ${{ env.AWS_DEFAULT_REGION }} - name: packer init run: packer init packer.pkr.hcl