build(deps): bump actions/checkout from 5 to 6 #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SwiftLint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: swiftlint-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: SwiftLint | |
| runs-on: ubuntu-latest | |
| container: swift:6.2 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Restore swiftlint cache | |
| id: cache-swiftlint-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: /usr/local/bin/swiftlint | |
| key: ${{ runner.os }}-swiftlint-0.62.2 | |
| - name: Install swiftlint | |
| if: steps.cache-swiftlint-restore.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 --branch 0.62.2 https://github.com/realm/SwiftLint.git | |
| cd SwiftLint | |
| swift build -c release | |
| cp .build/release/swiftlint /usr/local/bin/ | |
| cd .. | |
| rm -rf SwiftLint | |
| - name: Lint | |
| run: swiftlint lint --strict --reporter github-actions-logging | |
| - name: Save swiftlint cache | |
| uses: actions/cache/save@v4 | |
| if: always() && steps.cache-swiftlint-restore.outputs.cache-hit != 'true' | |
| with: | |
| path: /usr/local/bin/swiftlint | |
| key: ${{ runner.os }}-swiftlint-0.62.2 |