-
Notifications
You must be signed in to change notification settings - Fork 276
73 lines (72 loc) · 2.62 KB
/
pr.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
69
70
71
72
73
on:
pull_request:
paths-ignore:
- "**.md"
- "channel.yaml"
- "install.sh"
- "!.github/workflows/test-suite.yaml"
name: PR Build
permissions:
contents: read
jobs:
build-amd64:
runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }},image=ubuntu22-full-x64,hdd=64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
version: v0.16.0
driver: docker-container
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Export Cache Env Vars
uses: actions/github-script@v7
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
- name: Install Dapper
run: |
curl -sL https://github.com/brandond/dapper/releases/download/v0.7.0-bd5/dapper-$(uname -s)-$(uname -m) > /usr/local/bin/dapper
chmod +x /usr/local/bin/dapper
- name: Build
run: |
dapper -f Dockerfile --bake --cache-from type=gha --cache-to type=gha,ignore-error=true,mode=max --target dapper make dapper-ci
env:
BUILDX_BUILDER: ${{ steps.buildx.outputs.name }}
SKIP_DEV_RPM: true
- name: Test
run: |
dapper -f Dockerfile --bake --cache-from type=gha --cache-to type=gha,ignore-error=true,mode=max --target dapper make test
env:
BUILDX_BUILDER: ${{ steps.buildx.outputs.name }}
build-arm64:
runs-on: runs-on,runner=8cpu-linux-arm64,run-id=${{ github.run_id }},image=ubuntu22-full-arm64,hdd=64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
version: v0.16.0
driver: docker-container
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Install Dapper
run: |
curl -sL https://github.com/brandond/dapper/releases/download/v0.7.0-bd5/dapper-$(uname -s)-$(uname -m) > /usr/local/bin/dapper
chmod +x /usr/local/bin/dapper
- name: Build
run: |
dapper -f Dockerfile --bake --cache-from type=gha --cache-to type=gha,ignore-error=true,mode=max --target dapper make dapper-ci
env:
BUILDX_BUILDER: ${{ steps.buildx.outputs.name }}