-
Notifications
You must be signed in to change notification settings - Fork 10
91 lines (84 loc) · 2.51 KB
/
Copy pathdocker-multiarch.yml
File metadata and controls
91 lines (84 loc) · 2.51 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Docker Multi-arch Build
on:
workflow_call:
inputs:
image-name:
required: true
type: string
jobs:
build-examples:
uses: ./.github/workflows/examples.yml
with:
upload: true
build-amd64:
needs: build-examples
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: download examples output
uses: actions/download-artifact@v4
with:
name: examples-output
path: docs
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: install rops
uses: quantmind/rops/.github/actions/setup-rops@main
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_DEPLOYMENT }}
- name: build amd64
run: rops docker build ${{ inputs.image-name }}
- name: push amd64
run: rops docker push ${{ inputs.image-name }} --arch
build-arm64:
needs: build-examples
runs-on: ubuntu-24.04-arm
env:
GITHUB_TOKEN: ${{ github.token }}
DOCKER_BUILDKIT: 0
steps:
- uses: actions/checkout@v4
- name: download examples output
uses: actions/download-artifact@v4
with:
name: examples-output
path: docs
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: install rops
uses: quantmind/rops/.github/actions/setup-rops@main
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_DEPLOYMENT }}
- name: build arm64
run: rops docker build ${{ inputs.image-name }}
- name: push arm64
run: rops docker push ${{ inputs.image-name }} --arch
manifest:
needs: [build-amd64, build-arm64]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: install rops
uses: quantmind/rops/.github/actions/setup-rops@main
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_DEPLOYMENT }}
- name: create manifest
run: rops docker manifest ${{ inputs.image-name }}