Skip to content

Commit

Permalink
ci: use reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssimon committed Nov 3, 2022
1 parent 9d2dfca commit 42410b0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on:
Expand All @@ -11,16 +8,11 @@ on:

jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
needs_run: ${{ (github.event_name != 'pull_request' && (steps.PR.outcome != 'success' || steps.PR.outputs.number == null)) || github.event_name == 'pull_request' }}
steps:
- uses: 8BitJonny/gh-get-current-pr@v2.1.3
id: PR
uses: jenssimon/gh-workflows/.github/workflows/skip-push-pr-duplicates.yml@v1.0.1

build:
needs: pre_job
if: ${{ needs.pre_job.outputs.needs_run == 'true' || (github.event_name == 'push' && contains('refs/heads/master refs/heads/main', github.ref)) }}
if: ${{ needs.pre_job.outputs.needs_run_and_release == 'true' }}
runs-on: ubuntu-latest

strategy:
Expand Down

0 comments on commit 42410b0

Please sign in to comment.