Skip to content

Commit

Permalink
chore: Build not push on Pull Request (kserve#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kadner <ckadner@us.ibm.com>
  • Loading branch information
ckadner authored Jan 10, 2023
1 parent 31bd1bf commit bac0dd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
tags:
- v*
pull_request:

jobs:
test:
Expand All @@ -29,8 +30,10 @@ jobs:
- name: Build runtime image
run: make build
- name: Log in to Docker Hub
if: github.event_name == 'push'
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Push to Docker Hub
if: github.event_name == 'push'
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
Expand Down

0 comments on commit bac0dd9

Please sign in to comment.