Skip to content

Commit

Permalink
fix: use run instead of docker
Browse files Browse the repository at this point in the history
Signed-off-by: WoodenMaiden <yann.pomie@laposte.net>
  • Loading branch information
WoodenMaiden committed Jul 9, 2024
1 parent f064b60 commit 8303fb0
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/push_to_private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,18 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}

- name: Build and push Docker image ${{ inputs.registry_host }}/${{ inputs.image_name }}:${{ inputs.tag }}
uses: docker/build-push-action@v6.3.0
with:
build-args: ${{ steps.normalize_build_args.outputs.args }}
push: true
context: ${{ inputs.context }}
file: ${{ inputs.dockerfile }}
tags: ${{ inputs.registry_host }}/${{ inputs.image_name }}:${{ inputs.tag }},${{ inputs.registry_host }}/${{ inputs.image_name }}:latest
run: |
cd ${{ inputs.context }}
docker build . --build-arg ${{ steps.normalize_build_args.outputs.args }} -t ${{ inputs.registry_host }}/${{ inputs.image_name }}:${{ inputs.tag }} -t ${{ inputs.registry_host }}/${{ inputs.image_name }}:latest
docker push ${{ inputs.registry_host }}/${{ inputs.image_name }}:${{ inputs.tag }}
docker push ${{ inputs.registry_host }}/${{ inputs.image_name }}:latest
# uses: docker/build-push-action@v6.3.0
# with:
# build-args: ${{ steps.normalize_build_args.outputs.args }}
# push: true
# context: ${{ inputs.context }}
# file: ${{ inputs.dockerfile }}
# tags: ${{ inputs.registry_host }}/${{ inputs.image_name }}:${{ inputs.tag }},${{ inputs.registry_host }}/${{ inputs.image_name }}:latest

0 comments on commit 8303fb0

Please sign in to comment.