diff --git a/.github/workflows/lambda_build.yml b/.github/workflows/lambda_build.yml index d2da3d1..25998b9 100644 --- a/.github/workflows/lambda_build.yml +++ b/.github/workflows/lambda_build.yml @@ -58,6 +58,7 @@ on: description: "The registry where the image was pushed" value: ${{ jobs.build.outputs.registry }} + jobs: build: name: Build (${{ inputs.environment }}) @@ -106,6 +107,16 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Write license file if secret exists + run: + if [ -n "${{ secrets.LICENSE }}" ]; then + echo "${{ secrets.LICENSE }}" > dist/LICENSE.txt + echo "License file created at dist/LICENSE.txt" + else + echo "LICENSE_TEXT secret not provided. Skipping license file creation." + fi + + - name: Build and push uses: docker/build-push-action@v6 with: