Skip to content

Commit

Permalink
Add docker cache to other builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RonFed committed Sep 28, 2024
1 parent 2bacba7 commit e9891a0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
push: false
tags: autoscaler:pr-${{ github.event.number }}
build-args: SERVICE_NAME=autoscaler
cache-from: type=gha
cache-to: type=gha,mode=max
build-scheduler:
runs-on: ubuntu-latest
steps:
Expand All @@ -32,6 +34,8 @@ jobs:
push: false
tags: scheduler:pr-${{ github.event.number }}
build-args: SERVICE_NAME=scheduler
cache-from: type=gha
cache-to: type=gha,mode=max
build-and-test-instrumentor:
runs-on: ubuntu-latest
steps:
Expand All @@ -48,6 +52,8 @@ jobs:
push: false
tags: instrumentor:pr-${{ github.event.number }}
build-args: SERVICE_NAME=instrumentor
cache-from: type=gha
cache-to: type=gha,mode=max
- name: run tests
working-directory: ./instrumentor
run: |
Expand All @@ -58,14 +64,6 @@ jobs:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: build Odigos Collector Image
uses: docker/build-push-action@v6
with:
Expand All @@ -74,6 +72,8 @@ jobs:
tags: odigos-collector:pr-${{ github.event.number }}
context: ./collector
file: collector/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: run tests
working-directory: ./collector
run: |
Expand Down Expand Up @@ -117,6 +117,8 @@ jobs:
context: .
push: false
tags: frontend:pr-${{ github.event.number }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-cli:
runs-on: ubuntu-latest
Expand Down

0 comments on commit e9891a0

Please sign in to comment.