Skip to content

Commit 70c04f6

Browse files
authored
tools: manual build (#767)
1 parent c72b222 commit 70c04f6

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

.github/workflows/ci.yml renamed to .github/workflows/auto-build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: Auto Build
22

33
on: push
44

@@ -24,8 +24,6 @@ jobs:
2424
with:
2525
python-version: '3.9'
2626
architecture: 'x64'
27-
- name: Show Python version
28-
run: python -c "import sys; print(sys.version)"
2927
- name: Build and push
3028
run: tools/push -p linux/amd64
3129
build-arm64:

.github/workflows/manual-build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Manual Build
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
images:
7+
description: 'Images to build'
8+
required: true
9+
10+
jobs:
11+
build-amd64:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v1
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
- name: Login to DockerHub
19+
uses: docker/login-action@v1
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
- name: Set up Python 3.9
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: '3.9'
31+
architecture: 'x64'
32+
- name: Build and push
33+
run: tools/push -p linux/amd64 ${{ github.event.inputs.images }}
34+
build-arm64:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v1
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v1
41+
- name: Login to DockerHub
42+
uses: docker/login-action@v1
43+
with:
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
- name: Checkout
47+
uses: actions/checkout@v2
48+
with:
49+
fetch-depth: 0
50+
- name: Set up Python 3.9
51+
uses: actions/setup-python@v2
52+
with:
53+
python-version: '3.9'
54+
architecture: 'x64'
55+
- name: Show Python version
56+
run: python -c "import sys; print(sys.version)"
57+
- name: Build and push
58+
run: tools/push -p linux/arm64 ${{ github.event.inputs.images }}

0 commit comments

Comments
 (0)