Reputation: 70765
Since GitHub mac actions are slow and expensive, how can I run swiftlint under a linux environment in an action?
Upvotes: 2
Views: 1083
Reputation: 70765
The easiest way is to use the official swiftlint docker image as the container for the action:
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
Upvotes: 4