Skip to content

Commit

Permalink
Remove labeled type filter, improve conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
p4checo committed May 17, 2024
1 parent 4e7bc4e commit 4790643
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
pull_request_target: # forks don't have access to secrets if we use `pull_request`, which is required for codecov
branches:
- master
types: [labeled] # ensure PRs are labelled, which can only be done by users with triage access

env:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#xcode
Expand All @@ -25,7 +24,10 @@ jobs:
env-details:
name: Environment details
runs-on: macos-14
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run ci') }}
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
(github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'run ci'))
steps:
- name: xcode version
run: xcodebuild -version -sdk
Expand All @@ -41,7 +43,10 @@ jobs:
build-test:
name: Build and Test
runs-on: macos-14
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run ci') }}
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
(github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'run ci'))
env:
WORKSPACE: Alicerce.xcworkspace
SCHEME: Alicerce
Expand Down Expand Up @@ -136,7 +141,10 @@ jobs:
swiftpm:
name: SwiftPM Build
runs-on: macos-14
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run ci') }}
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
(github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'run ci'))
env:
WORKSPACE: Alicerce.xcworkspace
SCHEME: "Alicerce (SPM)"
Expand Down Expand Up @@ -207,7 +215,10 @@ jobs:
cocoapods:
name: CocoaPods Verification
runs-on: macos-14
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run ci') }}
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
(github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'run ci'))
steps:
- name: git checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -237,7 +248,10 @@ jobs:
carthage:
name: Carthage Verification
runs-on: macos-14
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run ci') }}
if: |
github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork ||
(github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'run ci'))
env:
# Use Xcode 15.3 (latest) for Carthage to avoid iOS device/simulator version mismatches
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer"
Expand Down

0 comments on commit 4790643

Please sign in to comment.