-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (37 loc) · 1.2 KB
/
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
40
---
name: Container build
on:
push:
branches:
- master
- main
- renovate/**
pull_request:
jobs:
build:
name: Build and scan image
runs-on: ubuntu-latest
env: # Variables as understood by docker-build.sh
DOCKER_IMAGE: newrelic/infrastructure-bundle
DOCKER_IMAGE_TAG: ci
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Download integrations
run: go run downloader.go
# Due to a limitation of buildx, multiarch images cannot be `--load`ed to the host
# Therefore, to test vulnerabilities, we also re-build (fast with cache) for amd64 only and load it
- name: Build docker image for all platforms
run: |
# Test build, but not load, for all archs
./docker-build.sh .
# Build and load for amd64 only (for snyk)
DOCKER_PLATFORMS=linux/amd64 ./docker-build.sh . --load
- name: Check if CHANGELOG is valid
uses: newrelic/release-toolkit/validate-markdown@v1