Skip to content

Commit

Permalink
replace pull_request with pull_request_target (#79)
Browse files Browse the repository at this point in the history
* Update swift.yml

* Update swift.yml
  • Loading branch information
wenxi-zeng authored Oct 21, 2021
1 parent fb9f85c commit f709411
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
branches: [ main ]

jobs:
build_and_test_spm_mac:
Expand Down Expand Up @@ -47,12 +49,6 @@ jobs:
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }}
# Workarounds for Xcode/SPM failing to get packages
- run: sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
- run: rm ~/.ssh/id_rsa || true
- run: for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
- run: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
# Xcodebuild will automatically build so no need to call it out specifically.
- run: xcodebuild -scheme Segment-Package test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11'

build_and_test_tvos:
Expand All @@ -65,12 +61,6 @@ jobs:
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }}
# Workarounds for Xcode/SPM failing to get packages
- run: sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
- run: rm ~/.ssh/id_rsa || true
- run: for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
- run: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
# Xcodebuild will automatically build so no need to call it out specifically.
- run: xcodebuild -scheme Segment-Package test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV'

build_and_test_watchos:
Expand All @@ -83,12 +73,6 @@ jobs:
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }}
# Workarounds for Xcode/SPM failing to get packages
- run: sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
- run: rm ~/.ssh/id_rsa || true
- run: for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
- run: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
# Xcodebuild will automatically build so no need to call it out specifically.
- run: xcodebuild -scheme Segment-Package test -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 5 - 40mm'

build_examples:
Expand All @@ -101,11 +85,6 @@ jobs:
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }}
# Workarounds for Xcode/SPM failing to get packages
- run: sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
- run: rm ~/.ssh/id_rsa || true
- run: for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
- run: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
- name: build for ios simulator
run: |
cd Examples/apps/BasicExample
Expand Down

0 comments on commit f709411

Please sign in to comment.