Skip to content

Commit ed9b825

Browse files
committed
Fix error[template-injection]: code injection via template expansion
1 parent b43976a commit ed9b825

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/build-and-push.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
permissions:
1818
contents: read
1919
packages: write
20+
env:
21+
CONTAINER: ${{ inputs.container }}
2022
steps:
2123
- name: Set Calver Date
2224
run: |
@@ -49,7 +51,7 @@ jobs:
4951
set -euo pipefail
5052
5153
# Extract labels from the Dockerfile.
52-
DOCKERFILE=./${{ inputs.container }}/Dockerfile
54+
DOCKERFILE="./${CONTAINER}/Dockerfile"
5355
5456
# Function to extract a label value.
5557
extract_label() {
@@ -101,7 +103,7 @@ jobs:
101103
- name: Build and push
102104
uses: docker/build-push-action@v6
103105
with:
104-
context: ./${{ inputs.container }}
106+
context: ./${{ env.CONTAINER }}
105107
platforms: linux/amd64,linux/arm64
106108
push: true
107109
tags: |

0 commit comments

Comments
 (0)