Skip to content

Commit

Permalink
fix(ci): split PR workflow into two to handle events separately
Browse files Browse the repository at this point in the history
  • Loading branch information
jenstroeger committed Oct 8, 2022
1 parent 275d5cd commit 78edf05
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr-change-set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow checks and tests the package code, and it builds all package
# artifacts whenever there were changes to a pull request.

name: 'Pull Request: change set'
on:
pull_request:
branches:
- main
- staging
types:
- opened
- reopened
- synchronize
permissions:
contents: read

jobs:

# If the build workflow needs to access secrets, they need to be passed using `secrets: inherit`.
# See https://docs.github.com/en/actions/using-workflows/reusing-workflows to learn more.
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
# for the security recommendations.
build:
uses: ./.github/workflows/build.yaml
permissions:
contents: read
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# tool to check the title of the PR and all commit messages of the branch
# which triggers this Action.

name: Pull Request
name: 'Pull Request: conventional commits'
on:
pull_request:
branches:
Expand All @@ -19,7 +19,6 @@ permissions:

jobs:
conventional-commits:
name: Check PR title and commit messages
runs-on: ubuntu-latest
steps:

Expand Down Expand Up @@ -55,10 +54,3 @@ jobs:
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_REPO_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}

build:
needs: conventional-commits
if: ${{ github.event.action != 'edited' }}
uses: ./.github/workflows/build.yaml
permissions:
contents: read

0 comments on commit 78edf05

Please sign in to comment.