diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e52a228..eefb183 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -47,9 +47,6 @@ on: build-secrets: description: "The Docker secrets to use for the build" required: false - LICENSE: - description: "The licence file to bundle into the ECR image" - required: false jobs: setup: @@ -112,7 +109,6 @@ jobs: aws-key-id: ${{ secrets.aws-key-id }} aws-secret-key: ${{ secrets.aws-secret-key }} build-secrets: ${{ secrets.build-secrets }} - license: ${{ secrets.LICENSE }} deploy-staging: uses: ./.github/workflows/lambda_deploy.yml diff --git a/.github/workflows/lambda_build.yml b/.github/workflows/lambda_build.yml index bda50e8..d2da3d1 100644 --- a/.github/workflows/lambda_build.yml +++ b/.github/workflows/lambda_build.yml @@ -53,15 +53,11 @@ on: build-secrets: description: "The Docker secrets to use for the build" required: false - LICENSE: - description: "The licence file to bundle into the ECR image" - required: false outputs: registry: description: "The registry where the image was pushed" value: ${{ jobs.build.outputs.registry }} - jobs: build: name: Build (${{ inputs.environment }}) @@ -72,8 +68,6 @@ jobs: id-token: write outputs: registry: ${{ steps.login-ecr.outputs.registry }} - env: - LICENSE: ${{ secrets.LICENSE }} steps: - name: Checkout uses: actions/checkout@v4 @@ -112,37 +106,7 @@ 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 - mkdir ./dist/ - echo "${{ secrets.LICENSE }}" > ./dist/LICENSE.txt - echo "License file created at ./dist/LICENSE.txt" - ls ./dist - else - echo "LICENSE_TEXT secret not provided. Skipping license file creation." - fi - - - - name: Build and push with licence - if: ${{ env.LICENSE != '' }} - uses: docker/build-push-action@v6 - with: - file: ${{ inputs.build-file || 'Dockerfile' }} - context: ${{ inputs.build-context || '.'}} - target: with-license - push: ${{ inputs.build-push }} - provenance: false - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max,ignore-error=true - platforms: ${{ inputs.build-platforms }} - build-args: ${{ inputs.build-args }} - secrets: ${{ secrets.build-secrets }} - - - name: Build and push without licence - if: ${{ env.LICENSE != '' }} + - name: Build and push uses: docker/build-push-action@v6 with: file: ${{ inputs.build-file || 'Dockerfile' }}