Skip to content

Merge branch 'main' into storage-get-url-change #271

Merge branch 'main' into storage-get-url-change

Merge branch 'main' into storage-get-url-change #271

Workflow file for this run

name: SwiftFormat
on:
workflow_dispatch:
workflow_call:
inputs:
identifier:
required: true
type: string
push:
branches-ignore:
- main
- v1
- release
- release-v1
permissions:
contents: read
concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main'}}
jobs:
run-swiftformat:
runs-on: macos-latest
env:
SWIFTFORMAT_VERSION: '0.60.1'
SWIFTFORMAT_SHA256: 'cb4738085cf39c08da00b79b4a3683e77458ca12909934d04e5087d8e73f5e43'
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
with:
persist-credentials: false
- name: Install SwiftFormat
run: |
curl -sL "https://github.com/nicklockwood/SwiftFormat/releases/download/$SWIFTFORMAT_VERSION/swiftformat.artifactbundle.zip" -o sf.zip
echo "$SWIFTFORMAT_SHA256 sf.zip" | shasum -a 256 --check
unzip -q sf.zip
- name: SwiftFormat
run: |
./swiftformat.artifactbundle/swiftformat-$SWIFTFORMAT_VERSION-macos/bin/swiftformat --version
./swiftformat.artifactbundle/swiftformat-$SWIFTFORMAT_VERSION-macos/bin/swiftformat --lint . --reporter github-actions-log --swiftversion 5.9
confirm-pass:
runs-on: macos-latest
name: Confirm Passing SwiftFormat
if: ${{ !cancelled() }}
needs: [ run-swiftformat ]
env:
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
steps:
- run: exit $EXIT_CODE