Skip to content

Commit

Permalink
GHA: Do not push image on pull requests [GH-180]
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed May 24, 2020
1 parent c4b4300 commit 07612fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ jobs:
- name: Prints GitHub actor and repository
run: echo "${{ github.actor }} @ ${{ github.repository }}"
- name: Push to Docker Hub
if: github.repository == 'EA31337/EA-Tester'
if: >
github.repository == 'EA31337/EA-Tester'
&& github.event_name != 'pull_request'
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ea31337/ea-tester
tag_with_ref: true
- name: Push to GitHub Packages
if: github.repository == 'EA31337/EA-Tester'
if: >
github.repository == 'EA31337/EA-Tester'
&& github.event_name != 'pull_request'
uses: docker/build-push-action@v1
with:
add_git_labels: true
Expand Down

0 comments on commit 07612fc

Please sign in to comment.