Skip to content

Commit e2f8716

Browse files
authored
Merge pull request #230 from CodeForPhilly/229-cicd-cache-maven-dependencies-to-speed-up-deployment
feat: Add Maven dep caching to CI/CD workflows
2 parents 045add4 + d98f070 commit e2f8716

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/deploy-builder-api.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ jobs:
4343
with:
4444
enable-cache: true
4545

46+
# Cache Maven dependencies to speed up builds
47+
- name: 'Cache Maven dependencies'
48+
uses: 'actions/cache@v4'
49+
with:
50+
path: ~/.m2/repository
51+
key: ${{ runner.os }}-maven-${{ hashFiles('builder-api/pom.xml') }}
52+
restore-keys: |
53+
${{ runner.os }}-maven-
54+
4655
# Configure Workload Identity Federation and generate an access token
4756
- id: 'auth'
4857
name: 'Authenticate to Google Cloud'

.github/workflows/deploy-library-api.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ jobs:
3737
with:
3838
enable-cache: true
3939

40+
# Cache Maven dependencies to speed up builds
41+
- name: 'Cache Maven dependencies'
42+
uses: 'actions/cache@v4'
43+
with:
44+
path: ~/.m2/repository
45+
key: ${{ runner.os }}-maven-${{ hashFiles('library-api/pom.xml') }}
46+
restore-keys: |
47+
${{ runner.os }}-maven-
48+
4049
# Extract version from pom.xml (source of truth) using Maven
4150
- name: 'Extract version from pom.xml'
4251
id: extract_version

0 commit comments

Comments
 (0)