Skip to content

Commit

Permalink
Various CI fixes including using pull request trigger
Browse files Browse the repository at this point in the history
We are doing this because push is very bad choice of trigger for CI on github PRs.
 Example: guardian/mobile-apps-api#2760

 Co-authored-Roberto Tyley
  • Loading branch information
Divs-B committed Apr 19, 2024
1 parent 85aba9e commit 0e4149e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/testonpush.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Test on push

name: CI
on:
workflow_dispatch:
pull_request:

# triggering CI default branch improves caching
# see https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
push:
branches: [ "**" ]
workflow_dispatch: {}
branches:
- main

jobs:
test:
Expand All @@ -15,10 +19,10 @@ jobs:
pull-requests: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11
Expand Down

0 comments on commit 0e4149e

Please sign in to comment.