Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on: [pull_request]

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

Expand All @@ -19,6 +19,12 @@ jobs:
with:
fetch-depth: 0

- name: Set up Java 11
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: '11'

- name: Test
env:
STREAM_KEY: ${{ secrets.STREAM_KEY }}
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@ COPY settings.gradle .
# Make gradlew executable
RUN chmod +x gradlew

CMD ["sh", "-c", "./gradlew :spotlessApply"]
RUN yum install -y shadow-utils findutils && yum clean all \
&& useradd --create-home --uid 1000 formatter \
&& chown -R formatter:formatter /code

ENV GRADLE_USER_HOME=/tmp/gradle
USER formatter

CMD ["sh", "-c", "./gradlew :spotlessApply"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ test_with_docker:

format_with_docker:
docker build -t stream-chat-java-formatter . && \
docker run -v $(PWD):/code stream-chat-java-formatter
docker run --user $$(id -u):$$(id -g) -v $(PWD):/code stream-chat-java-formatter
Loading