| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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
- - name: danger/swift
- uses: docker://frmeloni/danger-swift-with-swiftlint:1.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: sushichop/action-repository-permission@v1
- with:
- required-permission: write
- reaction-permitted: '+1'
- comment-not-permitted: "Sorry, you don't have enough permission to execute /run_checks..."
- - 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
- - name: danger/swift
- uses: docker://frmeloni/danger-swift-with-swiftlint:1.3.1
- with:
- args: "--pr ${{github.event.issue.pull_request.url}}"
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|