chore #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 }} |