Skip to content

Commit

Permalink
Add workflow dispatch and PR to docker-hub.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga authored Sep 25, 2024
1 parent c6bdb48 commit 52369a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: DockerHub

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
Expand All @@ -25,9 +27,11 @@ jobs:
run: docker build --build-arg DISABLE_CACHE=`date +%s` -t metacall/cli -f Dockerfile .

- name: Login to DockerHub
if: github.event_name != 'pull_request'
run: docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" -p "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}"

- name: Push MetaCall CLI Docker Image to DockerHub
if: github.event_name != 'pull_request'
run: |
docker tag metacall/cli ${{ env.IMAGE_NAME }}:latest
docker push ${{ env.IMAGE_NAME }}:latest
Expand All @@ -39,4 +43,5 @@ jobs:
fi
- name: Logout from DockerHub
if: github.event_name != 'pull_request'
run: docker logout

0 comments on commit 52369a8

Please sign in to comment.