Skip to content

Commit

Permalink
Update docker-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Aug 15, 2024
1 parent a44cc26 commit f6f42e0
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,20 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Build
uses: docker/build-push-action@v4
with:
push: false
context: ${{ inputs.directory }}
file: ${{ inputs.directory }}/Dockerfile
platforms: linux/amd64
tags: ${{ inputs.tag }}

# Login to Dockerhub
- name: Login to DockerHub
if: ${{ inputs.dockerhubpush != 'false' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build
uses: docker/build-push-action@v4
with:
push: ${{ inputs.dockerhubpush }}
context: ${{ inputs.directory }}
file: ${{ inputs.directory }}/Dockerfile
platforms: linux/amd64
tags: ${{ inputs.tag }}

# Push the Docker image if set to true from a manual trigger
- name: Push Docker image if manual trigger set to true
if: ${{ inputs.dockerhubpush != 'false' }}
run: docker push ${{ inputs.tag }}

0 comments on commit f6f42e0

Please sign in to comment.