mirror of
https://github.com/gradle/actions.git
synced 2025-08-23 10:21:28 +08:00
Run quick-check only if commit is NOT part of a PR
Without a mechanism to check this in the workflow trigger, we instead run the workflow but skip all jobs if the commit belongs to a PR. This effectively means that commits-without-PR will run quick-check, and commits-with-PR will run full-check.
This commit is contained in:
parent
d28f25d60a
commit
73638aa351
7
.github/workflows/ci-full-check.yml
vendored
7
.github/workflows/ci-full-check.yml
vendored
@ -3,17 +3,10 @@ name: CI-full-check
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
|
||||||
- assigned
|
|
||||||
- review_requested
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- release/**
|
- release/**
|
||||||
paths:
|
|
||||||
- '.github/**'
|
|
||||||
- 'dist/**'
|
|
||||||
- '**/action.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-distribution:
|
build-distribution:
|
||||||
|
11
.github/workflows/ci-quick-check.yml
vendored
11
.github/workflows/ci-quick-check.yml
vendored
@ -8,7 +8,18 @@ on:
|
|||||||
- release/**
|
- release/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-for-pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
is-pr-commit: ${{ steps.PR.outputs.pr_found }}
|
||||||
|
steps:
|
||||||
|
- name: Get current PR details
|
||||||
|
uses: 8BitJonny/gh-get-current-pr@3.0.0
|
||||||
|
id: PR
|
||||||
|
|
||||||
build-distribution:
|
build-distribution:
|
||||||
|
needs: check-for-pr
|
||||||
|
if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
Loading…
x
Reference in New Issue
Block a user