ci: build images for arm and amd #206
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: check-cluster-autoscaler-builds | |
on: | |
pull_request: | |
paths: | |
- "cluster-autoscaler/ca.tag" | |
- "cluster-autoscaler/ca.patch" | |
- "cluster-autoscaler/Dockerfile" | |
- ".github/workflows/check-ca-builds.yaml" | |
push: | |
branches: | |
- main | |
paths: | |
- "cluster-autoscaler/ca.tag" | |
- "cluster-autoscaler/ca.patch" | |
- "cluster-autoscaler/Dockerfile" | |
- ".github/workflows/check-ca-builds.yaml" | |
jobs: | |
build-ca: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ amd64, arm64 ] | |
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set custom docker config directory | |
uses: ./.github/actions/set-docker-config-dir | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker cache registry | |
uses: docker/login-action@v3 | |
with: | |
registry: cache.neon.build | |
username: ${{ secrets.NEON_CI_DOCKERCACHE_USERNAME }} | |
password: ${{ secrets.NEON_CI_DOCKERCACHE_PASSWORD }} | |
- name: get CA base git tag | |
id: get-ca-tag | |
run: | | |
echo "tag=$(cat cluster-autoscaler/ca.tag)" | tee -a $GITHUB_OUTPUT | |
- name: Build cluster-autoscaler image | |
uses: docker/build-push-action@v6 | |
with: | |
context: cluster-autoscaler | |
platforms: ${{format('linux/{0}', matrix.arch)}} | |
push: false | |
target: ${{format('cluster_autoscaler_{0}', matrix.arch)}} | |
file: cluster-autoscaler/Dockerfile | |
cache-from: type=registry,ref=cache.neon.build/cluster-autoscaler-neonvm:cache | |
build-args: | | |
CA_GIT_TAG=${{ steps.get-ca-tag.outputs.tag }} |