Skip to content

Commit b2b7cd2

Browse files
authored
chore(deps): automatically update swiftformat (#3207)
1 parent bcfdf51 commit b2b7cd2

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/actions/setup/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,18 @@ runs:
202202
with:
203203
swift-version: ${{ steps.versions.outputs.SWIFT_VERSION }}
204204

205+
- name: Set swiftformat version
206+
if: ${{ inputs.language == 'swift' }}
207+
id: swiftformat-version
208+
shell: bash
209+
run: echo "SWIFTFORMAT_VERSION=0.54.0" >> $GITHUB_OUTPUT
210+
205211
- name: Checkout swiftformat
206212
if: ${{ inputs.language == 'swift' }}
207213
uses: actions/checkout@v4
208214
with:
209215
repository: nicklockwood/SwiftFormat
210-
ref: 0.53.0
216+
ref: ${{ steps.swiftformat-version.outputs.SWIFTFORMAT_VERSION }}
211217
path: swiftformat
212218

213219
- name: Cache the build folder
@@ -216,7 +222,7 @@ runs:
216222
uses: actions/cache@v4
217223
with:
218224
path: swiftformat/.build
219-
key: swiftformat-build-0.53.0-${{ runner.os }}
225+
key: swiftformat-build-${{ steps.swiftformat-version.outputs.SWIFTFORMAT_VERSION }}-${{ runner.os }}
220226

221227
- name: Build swiftformat
222228
if: ${{ inputs.language == 'swift' && steps.cache-swiftformat.outputs.cache-hit != 'true' }}

renovate.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@
171171
],
172172
"datasourceTemplate": "github-tags",
173173
"depNameTemplate": "php/php-src"
174+
},
175+
{
176+
"description": "Update swiftformat version",
177+
"fileMatch": [
178+
"Dockerfile",
179+
".github/actions/setup/action.yml"
180+
],
181+
"matchStrings": [
182+
"SWIFTFORMAT_VERSION=(?<currentValue>\\d+\\.\\d+\\.\\d+)"
183+
],
184+
"depNameTemplate": "nicklockwood/SwiftFormat",
185+
"datasourceTemplate": "github-releases"
174186
}
175187
],
176188
"github-actions": {

scripts/docker/Dockerfile.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG SWIFT_VERSION
2+
ARG SWIFTFORMAT_VERSION=0.54.0
23

3-
FROM ghcr.io/nicklockwood/swiftformat:latest as swiftFormat
4+
FROM ghcr.io/nicklockwood/swiftformat:${SWIFTFORMAT_VERSION} AS swiftFormat
45
FROM swift:${SWIFT_VERSION}-jammy
56

67
COPY --from=swiftFormat /usr/bin/swiftformat /usr/bin/swiftformat

0 commit comments

Comments
 (0)