| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- name: Validations
- on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
- issue_comment:
- types: [ created ]
- env:
- LC_CTYPE: en_US.UTF-8
- LANG: en_US.UTF-8
- jobs:
- validate-cocoapods:
- runs-on: macos-latest
- if: github.event_name != 'issue_comment'
- steps:
- - uses: actions/checkout@v2
- - run: ./Scripts/ci-select-xcode.sh
- - run: pod lib lint
- run-danger-for-internal-pr:
- runs-on: ubuntu-latest
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - uses: danger/swift@3.3.1
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run-danger-for-external-pr:
- runs-on: ubuntu-latest
- if: |
- github.event_name == 'issue_comment' && github.event.action == 'created'
- && github.event.issue.pull_request != null
- && startsWith(github.event.comment.body, '/run_checks')
- steps:
- - uses: actions/github-script@v2
- with:
- script: |
- github.reactions.createForIssueComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- comment_id: context.payload.comment.id,
- content: "+1"
- })
- - uses: actions/github-script@v2
- id: pr-details
- with:
- script: |
- const { data: pullRequest } = await github.pulls.get({
- owner: context.repo.owner,
- repo: context.repo.repo,
- pull_number: context.issue.number
- });
- return pullRequest;
- - uses: actions/checkout@v2
- with:
- repository: ${{fromJSON(steps.pr-details.outputs.result).head.repo.full_name}}
- ref: ${{fromJSON(steps.pr-details.outputs.result).head.ref}}
- fetch-depth: 0
- - uses: danger/swift@3.3.2
- with:
- args: "--pr ${{github.event.issue.pull_request.url}}"
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|