Skip to content

Commit

Permalink
setup, build, test run every push and publish runs with synchronize
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanformio committed Mar 20, 2024
1 parent 61d4f6d commit 50d0013
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build / Test / Publish

on:
push:
pull_request:
types: [opened, synchronize]

Expand All @@ -10,6 +11,10 @@ env:
jobs:
setup:
runs-on: ubuntu-latest
# Prevents the setup, build, and test jobs from running on pull_request synchronize events
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.action == 'opened')
steps:
- run: echo "Triggered by ${{ github.event_name }} event."

Expand Down Expand Up @@ -44,6 +49,10 @@ jobs:
build:
needs: setup
runs-on: ubuntu-latest
# Prevents the setup, build, and test jobs from running on pull_request synchronize events
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.action == 'opened')
steps:
- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3
Expand All @@ -64,6 +73,10 @@ jobs:
test:
needs: setup
runs-on: ubuntu-latest
# Prevents the setup, build, and test jobs from running on pull_request synchronize events
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.action == 'opened')
steps:
- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3
Expand Down

0 comments on commit 50d0013

Please sign in to comment.