diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..99b9e5dd --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: auto PR swiftLint + +on: + pull_request: + branches: [ develop ] + paths: + - '.github/workflows/swiftlint.yml' + - '.swiftlint.yml' + - '**/*.swift' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: github action for swiftlint + uses: norio-nomura/action-swiftlint@master + env: + DIFF_BASE: ${{ github.base_ref }} + + - name: Add PR Comment + if: ${{ success() }} + uses: mshick/add-pr-comment@v1 + with: + message: | + ## All File Checked ✅ + | ✅ | Auto Pull Request SwiftLint Success!!!! | + |--- |---------------------------------------------- | + repo-token: ${{ secrets.ACCESS_TOKEN }} + repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens + allow-repeats: false # This is the default