Add build args
This commit is contained in:
parent
32d64b0d8c
commit
338b28aa71
@ -15,6 +15,10 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: ${{ vars.REGISTRY_PASSWORD }}
|
||||
build-args:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -34,6 +38,13 @@ jobs:
|
||||
username: ${{ inputs.username }}
|
||||
password: ${{ inputs.password }}
|
||||
- name: Build
|
||||
run: docker build . -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ inputs.tag }} -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
run: |
|
||||
BUILD_ARGS=""
|
||||
while IFS= read -r line; do
|
||||
BUILD_ARGS+=" --build-arg $line"
|
||||
done <<< "${{ inputs.build-args }}"
|
||||
docker build . $BUILD_ARGS \
|
||||
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ inputs.tag }} \
|
||||
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
- name: Push
|
||||
run: docker push ${{ vars.REGISTRY }}/${{ gitea.repository }} --all-tags
|
||||
|
Loading…
x
Reference in New Issue
Block a user