Skip to content

Commit

Permalink
Merge pull request lukasheinrich#7 from matthewfeickert/ci/run-on-PR-…
Browse files Browse the repository at this point in the history
…events

ci: Add running on pull_request events
  • Loading branch information
lukasheinrich authored Mar 20, 2020
2 parents ab60be7 + e70d3d4 commit 0726bdc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI/CD

on:
push:
pull_request:
schedule:
- cron: '1 0 * * *'

Expand All @@ -13,9 +14,13 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Build Docker image
run: |
docker build . \
--file Dockerfile \
--tag lukasheinrich/folding:$GITHUB_SHA \
--compress
docker images
if: "!(startsWith(github.ref, 'refs/tags/'))"
uses: docker/build-push-action@v1
with:
repository: lukasheinrich/folding
dockerfile: Dockerfile
tag_with_sha: true
tag_with_ref: true
push: false
- name: List Built Images
run: docker images
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Build and Publish to Registry
if: "! ${{ startsWith(github.ref, 'refs/tags/') }}"
if: "!(startsWith(github.ref, 'refs/tags/'))"
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -24,7 +24,7 @@ jobs:
dockerfile: Dockerfile
tags: latest
- name: Build and Publish to Registry with Release Tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit 0726bdc

Please sign in to comment.