-
Notifications
You must be signed in to change notification settings - Fork 1.8k
54 lines (52 loc) · 1.59 KB
/
push-cross-images.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
name: Cross Images
on:
push:
paths:
- '.github/workflows/push-cross-images.yml'
- 'rust/cubestore/cross/**'
branches:
- 'master'
pull_request:
paths:
- '.github/workflows/push-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 QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1
driver-opts: network=host
- name: Load .cross file
uses: xom9ikk/[email protected]
with:
path: rust/cubestore/cross/
- name: Push to Docker Hub
uses: docker/build-push-action@v6
with:
context: ./
file: ./rust/cubestore/cross/${{ matrix.target }}.Dockerfile
platforms: linux/amd64
push: ${{ github.ref == 'refs/heads/master' }}
tags: cubejs/rust-cross:${{ matrix.target }},cubejs/rust-cross:${{ matrix.target }}-${{ env.CROSS_VERSION }}