Skip to content

feat(settings): get beta updates from a signed feed #581

feat(settings): get beta updates from a signed feed

feat(settings): get beta updates from a signed feed #581

Workflow file for this run

name: SwiftLint
on:
pull_request:
push:
branches: [main, 'release/**']
workflow_dispatch:
concurrency:
group: swiftlint-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
SWIFTLINT_IMAGE: ghcr.io/realm/swiftlint:0.65.1@sha256:f47e083201e47a136cda5ae847595bfe00226c444ca226fa74fa5dc648a9b057
jobs:
swiftlint:
name: SwiftLint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# The image's entrypoint is swiftlint itself, so a second "swiftlint" would lint everything
# twice. SwiftLint drops a custom rule whose regex does not compile with only a warning and
# still exits 0, so the warning fails the step here. No --quiet: "Done linting" carries the
# file count.
- name: Run SwiftLint
run: |
status=0
docker run --rm -v "$PWD:/work" -w /work "$SWIFTLINT_IMAGE" \
lint --strict --reporter github-actions-logging 2> swiftlint.err || status=$?
grep -v "^Linting '" swiftlint.err >&2 || true
if grep -E "Invalid configuration|is not a valid rule identifier" swiftlint.err; then
echo "::error::A SwiftLint config has a rule SwiftLint could not load."
exit 1
fi
exit "$status"