-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (54 loc) · 1.71 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# permissions are needed if pushing to ghcr.io
permissions:
packages: write
jobs:
install:
name: Test installation
runs-on: ubuntu-latest-m
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Desktop
id: start_desktop
uses: docker/desktop-action/[email protected]
with:
docker-desktop-build-url: "https://desktop.docker.com/linux/main/amd64/160616/docker-desktop-amd64.deb"
- name: Edit Docker Desktop setting file
shell: bash
run: |
jq '.onlyMarketplaceExtensions = false' ~/.docker/desktop/settings.json > tmp.$$.json && mv tmp.$$.json ~/.docker/desktop/settings.json
- name: Validate metadata
run: docker extension validate ./metadata.json
- name: Build extension
run: docker build -t digma-docker-extension .
- name: Install extension
run: docker extension install digma-docker-extension -f
build:
name: Build
needs: [install]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build multi-platform image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: false