diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml deleted file mode 100644 index 702b0fb4..00000000 --- a/.github/workflows/danger.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Danger - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the main branch -on: - pull_request: - branches: [main] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - danger-lint: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - name: Danger Swift - uses: maxdesiatov/danger-swift@swiftlint-docker - if: github.event.pull_request.head.repo.full_name == github.repository - env: - GITHUB_TOKEN: ${{ secrets.PAT }} diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml new file mode 100644 index 00000000..a345d227 --- /dev/null +++ b/.github/workflows/swiftlint.yml @@ -0,0 +1,18 @@ +name: SwiftLint + +on: + pull_request: + paths: + - ".github/workflows/swiftlint.yml" + - ".swiftlint.yml" + - "**/*.swift" + +jobs: + SwiftLint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v1 + - name: GitHub Action for SwiftLint + uses: norio-nomura/action-swiftlint@3.1.0 + env: + DIFF_BASE: ${{ github.base_ref }}