-
Notifications
You must be signed in to change notification settings - Fork 14
84 lines (73 loc) · 1.89 KB
/
ci.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
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "!**.md"
- ".github/workflows/ci.yml"
- "deps/Cargo.*"
- ".dockerignore"
- "Dockerfile"
- "Makefile"
pull_request:
paths:
- "!**.md"
- ".github/workflows/ci.yml"
- "deps/Cargo.*"
- ".dockerignore"
- "Dockerfile"
- "Makefile"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
jobs:
docker:
runs-on: namespace-profile-ubuntu2204-${{ matrix.arch }}-8x16-with-cache
timeout-minutes: 20
permissions:
contents: read
packages: write
strategy:
fail-fast: true
matrix:
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: make login
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make build
- run: make test
- run: make test-build
merge:
if: ${{ github.event_name != 'pull_request' }}
needs: docker
runs-on: ubuntu-24.04
timeout-minutes: 2
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: make login
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
- run: make merge
test:
if: ${{ github.event_name != 'pull_request' }}
needs: merge
runs-on: ubuntu-24.04
timeout-minutes: 1
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: make test-build-with-latest