-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (38 loc) · 1.24 KB
/
pr-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: PR Build
on:
pull_request:
jobs:
build:
name: Build apps
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app-platform: [ ruby-on-rails ]
instrumentation-type: [ manual ]
env:
APP_PATH: sample-apps/${{ matrix.instrumentation-type}}-instrumentation/${{ matrix.app-platform }}
steps:
- name: Checkout This Repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Construct Sample App image tag
run: >
echo "APP_IMAGE=public.ecr.aws/aws-otel-test/ruby-${{ matrix.app-platform }}-${{ matrix.instrumentation-type }}:${{ github.sha }}" |
tee --append $GITHUB_ENV;
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: ${{ env.APP_PATH }}
tags: |
${{ env.APP_IMAGE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache