mirror of
https://github.com/gradle/actions.git
synced 2025-04-23 03:09:20 +08:00
Use pull_request triggers primarily for workflows
Instead of relying on push triggers in general, we now use pull_request and reserve push triggers for main and release branches. This makes the behaviour more consistent for users contributing from repository forks. However, we no longer have a quick-feedback loop for development.
This commit is contained in:
parent
3e155e3d92
commit
00c8cd2842
4
.github/workflows/ci-check-and-unit-test.yml
vendored
4
.github/workflows/ci-check-and-unit-test.yml
vendored
@ -2,6 +2,10 @@ name: CI-check-and-unit-test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'release/**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -3,10 +3,7 @@ name: CI-check-no-dist-update
|
|||||||
# Prohibit any change to 'dist/**' on a non-release branch
|
# Prohibit any change to 'dist/**' on a non-release branch
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
pull_request:
|
||||||
branches-ignore:
|
|
||||||
- 'main'
|
|
||||||
- 'release/**'
|
|
||||||
paths:
|
paths:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
|
|
||||||
|
2
.github/workflows/ci-codeql.yml
vendored
2
.github/workflows/ci-codeql.yml
vendored
@ -3,8 +3,6 @@ name: CI-codeql
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '25 23 * * 2'
|
- cron: '25 23 * * 2'
|
||||||
|
|
||||||
|
4
.github/workflows/ci-init-script-check.yml
vendored
4
.github/workflows/ci-init-script-check.yml
vendored
@ -2,6 +2,10 @@ name: CI-init-script-check
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'release/**'
|
||||||
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/ci-init-script-check.yml'
|
- '.github/workflows/ci-init-script-check.yml'
|
||||||
- 'sources/src/resources/init-scripts/**'
|
- 'sources/src/resources/init-scripts/**'
|
||||||
|
20
.github/workflows/ci-integ-test.yml
vendored
20
.github/workflows/ci-integ-test.yml
vendored
@ -2,7 +2,11 @@ name: CI-integ-test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'release/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
determine-suite:
|
determine-suite:
|
||||||
@ -11,9 +15,6 @@ jobs:
|
|||||||
runner-os: ${{ steps.determine-suite.outputs.suite == 'quick' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest", "macos-latest"]' }}
|
runner-os: ${{ steps.determine-suite.outputs.suite == 'quick' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest", "macos-latest"]' }}
|
||||||
cache-key-prefix: ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
|
cache-key-prefix: ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
|
||||||
steps:
|
steps:
|
||||||
- name: Get current PR details
|
|
||||||
uses: 8BitJonny/gh-get-current-pr@3.0.0
|
|
||||||
id: PR
|
|
||||||
- name: Determine suite to run
|
- name: Determine suite to run
|
||||||
id: determine-suite
|
id: determine-suite
|
||||||
run: |
|
run: |
|
||||||
@ -32,14 +33,11 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run full suite for PRs
|
# TODO: Make it easy to experiment with no PR and quick suite
|
||||||
if [ "${{ steps.PR.outputs.pr_found }}" == "false" ]; then
|
|
||||||
echo "PR not found: suite=quick"
|
# Run full suite for everything else
|
||||||
echo "suite=quick" >> "$GITHUB_OUTPUT"
|
echo "Everything else: suite=full"
|
||||||
else
|
echo "suite=full" >> "$GITHUB_OUTPUT"
|
||||||
echo "PR found: suite=full"
|
|
||||||
echo "suite=full" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build-distribution:
|
build-distribution:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
4
.github/workflows/ci-update-dist.yml
vendored
4
.github/workflows/ci-update-dist.yml
vendored
@ -4,8 +4,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
- 'release/**'
|
- 'release/**'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
Loading…
x
Reference in New Issue
Block a user