如何在GitHub Actions for linux上运行swiftlint ?



由于GitHub mac操作缓慢且昂贵,我如何在linux环境下运行swiftlint ?

最简单的方法是使用官方的swiftlint docker镜像作为动作的容器:

name: SwiftLint
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:5.5-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: SwiftLint
run: |
swiftlint --reporter github-actions-logging --strict

最新更新