-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (37 loc) · 1.04 KB
/
snapshot.yaml
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: Build PR Snapshots
on:
pull_request:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "~1.21.3"
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: docker/setup-buildx-action@v3
- uses: anchore/sbom-action/[email protected]
- name: Cache tools
uses: actions/cache@v4
with:
path: .tools
key: snapshot-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
- name: Touch tools
run: |
mkdir -p .tools
touch .tools/*
- name: Create Snapshot for Pull Request
run: make snapshot
- name: Upload Pull Request Preview
uses: actions/upload-artifact@v4
with:
name: otelcol_dynatrace_${{ github.event.pull_request.number }}_${{ github.run_number }}
path: dist/*