Skip to content

Commit 3461627

Browse files
committed
Updated workflow to use env
1 parent 203d255 commit 3461627

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/lambda_build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ jobs:
7272
id-token: write
7373
outputs:
7474
registry: ${{ steps.login-ecr.outputs.registry }}
75+
env:
76+
LICENSE: ${{ secrets.LICENSE }}
7577
steps:
7678
- name: Checkout
7779
uses: actions/checkout@v4
@@ -115,19 +117,18 @@ jobs:
115117
if [ -n "${{ secrets.LICENSE }}" ]; then
116118
echo "${{ secrets.LICENSE }}" > dist/LICENSE.txt
117119
echo "License file created at dist/LICENSE.txt"
118-
echo "target=with-licence" >> $GITHUB_OUTPUT
119120
else
120121
echo "LICENSE_TEXT secret not provided. Skipping license file creation."
121122
fi
122123
123124
124125
- name: Build and push with licence
125-
if: ${{ secrets.LICENSE != '' }}
126+
if: ${{ env.LICENSE != '' }}
126127
uses: docker/build-push-action@v6
127128
with:
128129
file: ${{ inputs.build-file || 'Dockerfile' }}
129130
context: ${{ inputs.build-context || '.'}}
130-
target: ${{ steps.license.outputs.target }}
131+
target: with-license
131132
push: ${{ inputs.build-push }}
132133
provenance: false
133134
tags: ${{ steps.meta.outputs.tags }}
@@ -139,7 +140,7 @@ jobs:
139140
secrets: ${{ secrets.build-secrets }}
140141

141142
- name: Build and push without licence
142-
if: ${{ secrets.LICENSE != '' }}
143+
if: ${{ env.LICENSE != '' }}
143144
uses: docker/build-push-action@v6
144145
with:
145146
file: ${{ inputs.build-file || 'Dockerfile' }}

0 commit comments

Comments
 (0)