Skip to content

Commit

Permalink
Make workflows run on both push and pull_request
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindhagberg authored and terjekv committed Mar 29, 2023
1 parent c5041c0 commit d5e3d56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Container image
on:
push:
branches:
- master
# Run every week to get updated dependencies.
paths-ignore:
- 'ci/**'
- 'README.md'
schedule:
- cron: '40 08 * * 1'
- cron: '40 08 * * 1' # Run every week to get updated dependencies.
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -53,6 +56,8 @@ jobs:
publish:
name: Publish
# only publish the image if this event was triggered on the master branch, and not by a pull request
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
needs: test
runs-on: ubuntu-latest
permissions:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on:
paths-ignore:
- 'ci/**'
- 'README.md'

pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

name: CI
jobs:
Expand Down

0 comments on commit d5e3d56

Please sign in to comment.