-
Notifications
You must be signed in to change notification settings - Fork 32
76 lines (70 loc) · 2.4 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
---
name: ci
on:
push: ~
permissions:
contents: read
jobs:
build-push:
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-24.04", "ubuntu-24.04-arm" ]
makefile: [
"Makefile",
"Makefile.debian7",
"Makefile.debian8",
"Makefile.debian9",
"Makefile.debian10",
"Makefile.debian11",
"Makefile.debian12"
]
fips: [ "false", "true" ]
# NOTE:
# exclude arm64 builds for all but debian9
exclude:
- makefile: "Makefile"
os: "ubuntu-24.04-arm"
- makefile: "Makefile.debian7"
os: "ubuntu-24.04-arm"
- makefile: "Makefile.debian8"
os: "ubuntu-24.04-arm"
- makefile: "Makefile.debian10"
os: "ubuntu-24.04-arm"
- makefile: "Makefile.debian11"
os: "ubuntu-24.04-arm"
- makefile: "Makefile.debian12"
os: "ubuntu-24.04-arm"
runs-on: ${{ matrix.os }}
env:
FIPS: "${{matrix.fips}}"
# NOTE: arm builds are suffixed with '-arm' in their make goals
GOAL_SUFFIX: ${{ contains(matrix.os, 'arm') && '-arm' || '' }}
steps:
- uses: actions/checkout@v4
- uses: elastic/oblt-actions/google/auth@v1
- name: Debug gcloud CLI
run: |
gcloud info || true
gsutil list -lra gs://golang-crossbuild-tmp/private || true
gcloud auth list --filter=status:ACTIVE --format="value(account)" || true
- name: Docker build and push
uses: ./.github/actions/build-push
with:
docker-registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
docker-username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
docker-password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
make-directory: 'go'
make-file: ${{matrix.makefile}}
make-goal-suffix: ${{ env.GOAL_SUFFIX }}
env:
# TODO: support for other release branches with the format [0-9]+.[0-9]+
REPOSITORY: "${{ startsWith(github.head_ref, 'main') && 'docker.elastic.co/beats-dev' || 'docker.elastic.co/observability-ci' }}"
# TODO: use the google bucket instead
GS_BUCKET_PATH: "golang-crossbuild-tmp"
# TODO: bypass access to the google bucket for now
CI: "false"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}