From 92bfd1e3a7c263d422021b118b9305b3173a7fe0 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Sun, 25 Oct 2020 19:45:47 +0000 Subject: [PATCH] Replace Danger with SwiftLint to improve warnings --- .github/workflows/danger.yml | 23 ----------------------- .github/workflows/swiftlint.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/danger.yml create mode 100644 .github/workflows/swiftlint.yml diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml deleted file mode 100644 index 702b0fb46..000000000 --- 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 000000000..a345d227f --- /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 }}