Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions .github/workflows/develop.yml → .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Pull request or branch build
name: Branch build

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
push:
branches:
- "*"
Expand All @@ -23,11 +17,10 @@ jobs:
name: Check if build should be stopped
runs-on: ubuntu-latest
outputs:
result: ${{ github.event_name == 'push' && steps.stop-build.outputs.result || 'false' }}
result: ${{ steps.stop-build.outputs.result }}
steps:
- name: Check if there is an open PR for this branch
id: stop-build
if: ${{ github.event_name == 'push' }}
uses: actions/github-script@v8
env:
ORGANIZATION: mixxxdj
Expand Down Expand Up @@ -55,18 +48,14 @@ jobs:
- stop-build
uses: ./.github/workflows/pre-commit.yml
with:
pull_request: ${{ github.event_name == 'pull_request' }}
pull_request: false

checks:
if: needs.stop-build.outputs.result == 'false'
needs:
- stop-build
uses: ./.github/workflows/checks.yml

git:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/git.yml

build:
if: needs.stop-build.outputs.result == 'false'
needs:
Expand All @@ -75,17 +64,3 @@ jobs:
with:
branch: ${{ github.head_ref || github.ref_name }}
ref: ${{ github.ref }}

# This task is used as a probe for auto merge
# In the future, it could also be used to perform a status update (e.g once the whole CI is passing + is ready for review, add a specific label such as `need review`)
ready:
name: Ready to merge
needs:
- pre-commit
- checks
- git
- build
runs-on: ubuntu-latest
steps:
- name: Ready to go
run: "exit 0"
46 changes: 46 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pull request

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)
checks: write # to create new checks (coverallsapp/github-action)

jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
with:
pull_request: true

checks:
uses: ./.github/workflows/checks.yml

git:
uses: ./.github/workflows/git.yml

build:
uses: ./.github/workflows/build.yml
with:
branch: ${{ github.head_ref || github.ref_name }}
ref: ${{ github.ref }}

# This task is used as a probe for auto merge
# In the future, it could also be used to perform a status update (e.g once the whole CI is passing + is ready for review, add a specific label such as `need review`)
ready:
name: Ready to merge
needs:
- pre-commit
- checks
- git
- build
runs-on: ubuntu-latest
steps:
- name: Ready to go
run: "exit 0"
Loading