This repository has been archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
118 lines (105 loc) · 3.17 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: "Continuous Integration"
on:
schedule:
- cron: '0 2 * * *' # 2am UTC
push:
branches:
- master
- release/*
create:
pull_request:
branches:
- master
jobs:
validate-commits:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Commitsar check
uses: docker://aevea/commitsar
build-otel-base-image:
runs-on: ubuntu-latest
strategy:
matrix:
dockerfiles:
- ngx_otel_module/Dockerfile.base.alpine
- ngx_otel_module/Dockerfile.base.debian
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Build OTEL NGINX Base Image
shell: bash
env:
DOCKER_BUILDKIT: '1'
run: ./build.sh 'base' ${{ matrix.dockerfiles }}
- name: Push to Container Registry
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin && \
./push.sh "ghcr.io/nginxinc/"
build-brotli-image:
runs-on: ubuntu-latest
strategy:
matrix:
nginx-version: [ 1.19.10, 1.20.1, 1.21.6, 1.23.3 ]
dockerfiles:
- ngx_http_brotli_filter_module/Dockerfile.alpine
- ngx_http_brotli_filter_module/Dockerfile.debian
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Cache downloads
uses: actions/cache@v2
with:
key: downloads-${{ hashFiles('nginx_build_versions.txt') }}
path: downloads
- name: Build Container Images
shell: bash
env:
DOCKER_BUILDKIT: '1'
run: ./build.sh ${{ matrix.nginx-version }} ${{ matrix.dockerfiles }}
- name: Push to Container Registry
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin && \
./push.sh "ghcr.io/nginxinc/"
build-otel-image:
needs: build-otel-base-image
runs-on: ubuntu-latest
strategy:
matrix:
nginx-version: [ 1.19.10, 1.20.1, 1.21.6, 1.23.3 ]
dockerfiles:
- ngx_otel_module/Dockerfile.alpine
- ngx_otel_module/Dockerfile.debian
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Cache downloads
uses: actions/cache@v2
with:
key: downloads-${{ hashFiles('nginx_build_versions.txt') }}
path: downloads
- name: Build Container Images
shell: bash
env:
DOCKER_BUILDKIT: '1'
run: ./build.sh ${{ matrix.nginx-version }} ${{ matrix.dockerfiles }}
- name: Push to Container Registry
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin && \
./push.sh "ghcr.io/nginxinc/"