feat(repo): add lambda monorepo template #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| TF_IN_AUTOMATION: "1" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.22" | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: "1.5.7" | |
| - name: Package functions | |
| run: bash scripts/package.sh | |
| - name: Sync Terraform inputs | |
| run: node scripts/sync-terraform.js | |
| - name: Terraform init | |
| run: terraform -chdir=infra init -input=false | |
| - name: Terraform validate | |
| run: terraform -chdir=infra validate | |
| # deploy: | |
| # runs-on: ubuntu-latest | |
| # needs: build | |
| # if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Setup Node | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: "18" | |
| # - name: Setup Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: "3.11" | |
| # - name: Setup Go | |
| # uses: actions/setup-go@v5 | |
| # with: | |
| # go-version: "1.22" | |
| # - name: Setup Java | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # distribution: "temurin" | |
| # java-version: "17" | |
| # - name: Setup Rust | |
| # uses: dtolnay/rust-toolchain@stable | |
| # - name: Setup Terraform | |
| # uses: hashicorp/setup-terraform@v3 | |
| # with: | |
| # terraform_version: "1.5.7" | |
| # - name: Configure AWS credentials (OIDC) | |
| # uses: aws-actions/configure-aws-credentials@v4 | |
| # with: | |
| # role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| # aws-region: ${{ secrets.AWS_REGION }} | |
| # role-session-name: lambda-monorepo-ci | |
| # - name: Package functions | |
| # run: bash scripts/package.sh | |
| # - name: Sync Terraform inputs | |
| # run: node scripts/sync-terraform.js | |
| # - name: Terraform init | |
| # run: terraform -chdir=infra init -input=false | |
| # - name: Terraform apply | |
| # run: terraform -chdir=infra apply -auto-approve |