|
25 | 25 | IMAGE_NAME: ${{ github.repository }}/zenoh-mqtt-streamer |
26 | 26 |
|
27 | 27 | jobs: |
28 | | - build-binary: |
| 28 | + setup: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + outputs: |
| 31 | + tags: ${{ steps.meta.outputs.tags }} |
| 32 | + labels: ${{ steps.meta.outputs.labels }} |
| 33 | + steps: |
| 34 | + - name: Extract metadata and create tag |
| 35 | + id: meta |
| 36 | + uses: docker/metadata-action@v5 |
| 37 | + with: |
| 38 | + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
| 39 | + tags: | |
| 40 | + type=ref,event=branch |
| 41 | + type=ref,event=tag |
| 42 | + type=ref,event=pr |
| 43 | +
|
| 44 | + build-arm64: |
| 45 | + needs: setup |
29 | 46 | runs-on: ubuntu-latest |
30 | 47 | permissions: |
31 | 48 | contents: read |
32 | 49 | packages: write |
33 | | - |
34 | 50 | steps: |
35 | 51 | - name: Checkout repository |
36 | 52 | uses: actions/checkout@v4 |
37 | | - - name: Set up QEMU |
38 | | - uses: docker/setup-qemu-action@v3 |
| 53 | + |
39 | 54 | - name: Set up Docker buildx |
40 | 55 | uses: docker/setup-buildx-action@v3 |
41 | 56 |
|
|
46 | 61 | username: ${{ github.actor }} |
47 | 62 | password: ${{ secrets.GITHUB_TOKEN }} |
48 | 63 |
|
49 | | - - name: Extract metadata and create tag |
50 | | - id: meta |
51 | | - uses: docker/metadata-action@v5 |
52 | | - with: |
53 | | - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
54 | | - tags: | |
55 | | - type=ref,event=branch |
56 | | - type=ref,event=tag |
57 | | - type=ref,event=pr |
58 | | -
|
59 | | - - name: Install Rust |
60 | | - uses: actions-rs/toolchain@v1 |
61 | | - with: |
62 | | - toolchain: stable |
63 | | - profile: minimal |
64 | | - override: true |
65 | | - |
66 | | - - name: Install Cross |
67 | | - run: | |
68 | | - cargo install cross --git https://github.com/cross-rs/cross |
| 64 | + - name: Install Rust and Cross |
| 65 | + uses: ./.github/actions/setup-rust-cross |
69 | 66 |
|
70 | 67 | - name: Cross Build for arm64 |
71 | 68 | working-directory: example-streamer-implementations |
|
82 | 79 | tags: ${{ steps.meta.outputs.tags }} |
83 | 80 | labels: ${{ steps.meta.outputs.labels }} |
84 | 81 |
|
| 82 | + build-amd64: |
| 83 | + needs: setup |
| 84 | + runs-on: ubuntu-latest |
| 85 | + steps: |
| 86 | + - name: Checkout repository |
| 87 | + uses: actions/checkout@v4 |
| 88 | + |
| 89 | + - name: Set up Docker buildx |
| 90 | + uses: docker/setup-buildx-action@v3 |
| 91 | + |
| 92 | + - name: Login to the Container registry |
| 93 | + uses: docker/login-action@v3 |
| 94 | + with: |
| 95 | + registry: ${{ env.REGISTRY }} |
| 96 | + username: ${{ github.actor }} |
| 97 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 98 | + |
| 99 | + - name: Install Rust and Cross |
| 100 | + uses: ./.github/actions/setup-rust-cross |
| 101 | + |
85 | 102 | - name: Cross Build for amd64 |
86 | 103 | working-directory: example-streamer-implementations |
87 | 104 | run: | |
|
0 commit comments