-
-
Notifications
You must be signed in to change notification settings - Fork 142
/
Dockerfile
27 lines (20 loc) · 997 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ARG SWIFT_VERSION=5.9
FROM swift:${SWIFT_VERSION}-focal
LABEL org.opencontainers.image.authors="Orta Therox"
LABEL "com.github.actions.name"="Danger Swift"
LABEL "com.github.actions.description"="Runs Swift Dangerfiles"
LABEL "com.github.actions.icon"="zap"
LABEL "com.github.actions.color"="blue"
# Install nodejs and Danger
RUN apt-get update -q \
&& apt-get install -qy curl make ca-certificates \
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -qy nodejs \
&& npm install -g danger \
&& rm -r /var/lib/apt/lists/*
# RUN git clone -b 0.50.3 --single-branch --depth 1 https://github.com/realm/SwiftLint.git _swiftlint && cd _swiftlint && git submodule update --init --recursive && make install && rm -rf _swiftlint # swiftlint
# Install danger-swift globally
COPY . _danger-swift
RUN cd _danger-swift && make install && rm -rf _danger-swift
# Run Danger Swift via Danger JS, allowing for custom args
ENTRYPOINT ["danger-swift", "ci"]