Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Update configurations to enhance workflow automation, reduce Docker i…
Browse files Browse the repository at this point in the history
…mage size
  • Loading branch information
Ziedelth committed Oct 11, 2023
1 parent bbe182c commit 3e27aff
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
13 changes: 12 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
time: "10:00"
timezone: "Europe/Paris"
assignees:
- "Ziedelth"
reviewers:
- "Ziedelth"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
time: "10:00"
timezone: "Europe/Paris"
assignees:
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,26 @@ jobs:
distribution: 'adopt'

- name: Build
run: mvn -B package -DskipTests
run: mvn -B package -DskipTests

docker:
runs-on: ubuntu-latest

needs:
- build

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build docker file
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: registry.ziedelth.fr:5000/jais-api:dev
9 changes: 5 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,22 @@ jobs:

permissions: read-all
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Cache SonarQube packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM amazoncorretto:17-alpine
COPY --from=build /app/target/api-1.0.0-jar-with-dependencies.jar /app/api.jar
COPY --from=build /app/data/ /app/data/

RUN apk update && apk add gcompat opencv-dev
RUN apk update && apk add gcompat opencv-dev && rm -rf /var/cache/apk/*
EXPOSE 8080
WORKDIR /app
ENTRYPOINT ["java", "-jar", "api.jar"]

0 comments on commit 3e27aff

Please sign in to comment.