Skip to content

Commit

Permalink
Automate build of test infra
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Dec 7, 2023
1 parent 976b736 commit 0ce9788
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/deploy-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI
on:
push:
branches:
- "serverless"
- "test"
workflow_dispatch:

permissions:
Expand All @@ -19,8 +19,9 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
ref: serverless
shell: bash
run: echo "imagetag=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
id: extract_tag_name


# Check out the schema repo to package up the JSON schema with lambda function
Expand Down Expand Up @@ -68,8 +69,10 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
ref: serverless
name: Checkout to repository
shell: bash
run: echo "imagetag=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
id: extract_tag_name

# Check out the schema repo to package up the JSON schemae with function
- name: Checkout schema repo
Expand Down Expand Up @@ -103,12 +106,12 @@ jobs:
platforms: linux/amd64
provenance: false
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/mdf-lambdas/${{ matrix.lambda }}:test
tags: ${{ steps.login-ecr.outputs.registry }}/mdf-lambdas/${{ matrix.lambda }}:${{ steps.extract_tag_name.outputs.imagetag }}
file: ./aws/Dockerfile
build-args: LAMBDA_SCRIPT=${{ matrix.lambda }}

- name: Update lambda functions w/ the new containers
uses: materials-data-facility/deploy-lambda-action@v0
with:
function-name: MDF-Connect-${{ matrix.lambda }}-test
image-uri: ${{ steps.login-ecr.outputs.registry }}/mdf-lambdas/${{ matrix.lambda }}:test
function-name: MDF-Connect-${{ matrix.lambda }}-${{ steps.extract_tag_name.outputs.imagetag }}
image-uri: ${{ steps.login-ecr.outputs.registry }}/mdf-lambdas/${{ matrix.lambda }}:${{ steps.extract_tag_name.outputs.imagetag }}

0 comments on commit 0ce9788

Please sign in to comment.