chore(cross): Split images by python, use bake (#8458) #11
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: Cross Images | |
on: | |
push: | |
paths: | |
- '.github/workflows/cross-images.yml' | |
- 'rust/cubestore/cross/**' | |
branches: | |
- 'master' | |
pull_request: | |
paths: | |
- '.github/workflows/cross-images.yml' | |
- 'rust/cubestore/cross/**' | |
jobs: | |
docker-dev: | |
name: Build cross image for ${{ matrix.target }} target | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 120 | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-gnu | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to DockerHub | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
buildkitd-config: .github/buildkitd.toml | |
- name: Build and push | |
uses: docker/bake-action@v5 | |
with: | |
workdir: ./rust/cubestore/cross | |
targets: ${{ matrix.target }}-python | |
push: ${{ github.ref == 'refs/heads/master' }} |