Skip to content

Commit fa6867d

Browse files
committed
Add multi arch workflow
1 parent cae4506 commit fa6867d

3 files changed

Lines changed: 82 additions & 16 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,12 @@ jobs:
5353
if: ${{ matrix.python-version == '3.14' && github.event.head_commit.message == 'release' }}
5454
run: make publish
5555

56-
deploy:
57-
runs-on: ubuntu-latest
56+
image:
5857
if: github.ref == 'refs/heads/main'
5958
needs:
6059
- build
61-
env:
62-
PYTHON_ENV: ci
60+
uses: ./.github/workflows/docker-multiarch.yml
61+
with:
62+
image-name: quantflow
63+
secrets:
6364
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64-
FMP_API_KEY: ${{ secrets.FMP_API_KEY }}
65-
66-
steps:
67-
- name: Checkout repo
68-
uses: actions/checkout@v4
69-
- name: install rops
70-
run: |
71-
curl -L https://raw.githubusercontent.com/quantmind/rops/main/dev/install-rops | bash
72-
echo "$HOME/bin" >> $GITHUB_PATH
73-
- name: build image
74-
run: rops docker build quantflow
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Docker Multi-arch Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
image-name:
7+
required: true
8+
type: string
9+
secrets:
10+
GITHUB_TOKEN:
11+
required: true
12+
13+
jobs:
14+
build-amd64:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Login to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
- name: install rops
28+
run: |
29+
curl -L https://raw.githubusercontent.com/quantmind/rops/main/dev/install-rops | bash
30+
echo "$HOME/bin" >> $GITHUB_PATH
31+
- name: build amd64
32+
run: rops docker build ${{ inputs.image-name }}
33+
- name: push amd64
34+
run: rops docker push ${{ inputs.image-name }} --arch
35+
36+
build-arm64:
37+
runs-on: ubuntu-24.04-arm
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Login to GitHub Container Registry
44+
uses: docker/login-action@v3
45+
with:
46+
registry: ghcr.io
47+
username: ${{ github.actor }}
48+
password: ${{ secrets.GITHUB_TOKEN }}
49+
- name: install rops
50+
run: |
51+
curl -L https://raw.githubusercontent.com/quantmind/rops/main/dev/install-rops | bash
52+
echo "$HOME/bin" >> $GITHUB_PATH
53+
- name: build arm64
54+
run: rops docker build ${{ inputs.image-name }}
55+
- name: push arm64
56+
run: rops docker push ${{ inputs.image-name }} --arch
57+
58+
manifest:
59+
needs: [build-amd64, build-arm64]
60+
runs-on: ubuntu-latest
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Login to GitHub Container Registry
66+
uses: docker/login-action@v3
67+
with:
68+
registry: ghcr.io
69+
username: ${{ github.actor }}
70+
password: ${{ secrets.GITHUB_TOKEN }}
71+
- name: install rops
72+
run: |
73+
curl -L https://raw.githubusercontent.com/quantmind/rops/main/dev/install-rops | bash
74+
echo "$HOME/bin" >> $GITHUB_PATH
75+
- name: create manifest
76+
run: rops docker manifest ${{ inputs.image-name }}

‎rops.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ default_branch = "main"
55

66
[docker]
77
image_branch_tag_prefix = "branch"
8-
image_repo_url = "quantmind/quantflow"
8+
image_repo_url = "ghcr.io/quantmind"
99
files_path = "dev"

0 commit comments

Comments
 (0)