Skip to content

Commit

Permalink
changed docker-image.yml to use github actions cache for sbt dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
realkaranvir committed Dec 5, 2024
1 parent 45bb490 commit 2c2deed
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ jobs:
- name: Check Repository
uses: actions/checkout@v4

- name: Cache SBT Dependencies
uses: actions/cache@v4
with:
path: |
~/.ivy2
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/Build.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
Expand All @@ -38,5 +48,18 @@ jobs:
- name: Check Repository
uses: actions/checkout@v4

- name: Build the Docker Image
run: docker build . --file Dockerfile --tag femr-femr:latest
- name: Cache SBT Dependencies
uses: actions/cache@v4
with:
path: |
~/.ivy2
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/Build.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Build Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: false

0 comments on commit 2c2deed

Please sign in to comment.