Skip to content

Commit

Permalink
Don't push images on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Dec 14, 2019
1 parent b843d78 commit a17c442
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ jobs:
run: docker build . -t "$IMAGE_NAME"

- name: Log in to GitHub Package Registry
if: github.event_name == 'push'
run: echo "${{ secrets.GH_TOKEN }}" | docker login docker.pkg.github.com -u "$GH_USER" --password-stdin

- name: Push image
if: github.event_name == 'push'
run: |
IMAGE_ID="docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME"
VERSION=$(basename "${{ github.ref }}")
Expand Down

0 comments on commit a17c442

Please sign in to comment.