diff --git a/.github/workflows/lambda_build.yml b/.github/workflows/lambda_build.yml index 01e4919..6d40d07 100644 --- a/.github/workflows/lambda_build.yml +++ b/.github/workflows/lambda_build.yml @@ -72,6 +72,8 @@ jobs: id-token: write outputs: registry: ${{ steps.login-ecr.outputs.registry }} + env: + LICENSE: ${{ secrets.LICENSE }} steps: - name: Checkout uses: actions/checkout@v4 @@ -115,19 +117,18 @@ jobs: if [ -n "${{ secrets.LICENSE }}" ]; then echo "${{ secrets.LICENSE }}" > dist/LICENSE.txt echo "License file created at dist/LICENSE.txt" - echo "target=with-licence" >> $GITHUB_OUTPUT else echo "LICENSE_TEXT secret not provided. Skipping license file creation." fi - name: Build and push with licence - if: ${{ secrets.LICENSE != '' }} + if: ${{ env.LICENSE != '' }} uses: docker/build-push-action@v6 with: file: ${{ inputs.build-file || 'Dockerfile' }} context: ${{ inputs.build-context || '.'}} - target: ${{ steps.license.outputs.target }} + target: with-license push: ${{ inputs.build-push }} provenance: false tags: ${{ steps.meta.outputs.tags }} @@ -139,7 +140,7 @@ jobs: secrets: ${{ secrets.build-secrets }} - name: Build and push without licence - if: ${{ secrets.LICENSE != '' }} + if: ${{ env.LICENSE != '' }} uses: docker/build-push-action@v6 with: file: ${{ inputs.build-file || 'Dockerfile' }}